remove problematic tasks from ansible and define a post-install script

This commit is contained in:
2024-12-03 16:47:24 +01:00
parent 9031ce55b5
commit 2cbec8e59f
6 changed files with 81 additions and 39 deletions

View File

@@ -1,9 +1,9 @@
- name: Configure Caching and File locking
command: "{{ item }}"
loop: >
- occ config:system:set memcache.local --value '\OC\Memcache\APCu'
- occ config:system:set memcache.locking --value '\OC\Memcache\Redis'
- occ config:system:set redis --value '{"host": "127.0.0.1", "port": "6379"}' --type json
#- name: Configure Caching and File locking
# command: "{{ item }}"
# loop: >
# - occ config:system:set memcache.local --value '\OC\Memcache\APCu'
# - occ config:system:set memcache.locking --value '\OC\Memcache\Redis'
# - occ config:system:set redis --value '{"host": "127.0.0.1", "port": "6379"}' --type json
- name: Configure Log Rotation.
template:

View File

@@ -1,19 +0,0 @@
- name: Set background job mode to cron.
commmand: occ background:cron
- name: Set the exectution of cron jobs to every 15 min.
ansible.builtin.cron:
name: "exe cron."
minute: "*/15"
user: www-data
job: "/var/www/owncloud/occ system:cron"
state: present
- name: Cleanup of chunks every night at 2am.
ansible.builtin.cron:
name: "cleanup chunks."
minute: "0"
hour: "2"
user: www-data
job: "/var/www/owncloud/occ dav:cleanup-chunks"
state: present

View File

@@ -53,6 +53,7 @@
- inetutils-ping
- ldap-utils
- smbclient
- cron
#- name: Disable the firewall (since this is behind a firewall)
# service: name=ufw state=stopped

View File

@@ -23,9 +23,9 @@
include_tasks:
file: owncloud.yml
- name: Configure Cronjobs.
include_tasks:
file: cron.yml
#- name: Configure Cronjobs.
# include_tasks:
# file: cron.yml
- name: Configure ownCloud.
include_tasks:

View File

@@ -11,14 +11,13 @@
dest: "/var/www/"
owner: www-data
remote_src: yes
- name: Install ownCloud (via occ)
command: >
occ maintenance:install --database "mysql" --database-name "owncloud" --database-user "owncloud" --database-pass "{{ mysql_passwd }}" --data-dir "{{ owncloud_core_path }}/data" --admin-user "root" --admin-pass "{{ mysql_passwd }}"
- name: Configure ownCloud's trusted domains
command: "{{ item }}"
loop:
- my_ip=$(hostname -I|cut -f1 -d ' ')
- occ config:system:set trusted_domains 1 --value="$my_ip"
- occ config:system:set trusted_domains 2 --value="{{ hostname }}"
#- name: Install ownCloud (via occ)
# command: >
# occ maintenance:install --database "mysql" --database-name "owncloud" --database-user "owncloud" --database-pass "{{ mysql_passwd }}" --data-dir "{{ owncloud_core_path }}/data" --admin-user "root" --admin-pass "{{ mysql_passwd }}"
#
#- name: Configure ownCloud's trusted domains
# command: "{{ item }}"
# loop:
# - my_ip=$(hostname -I|cut -f1 -d ' ')
# - occ config:system:set trusted_domains 1 --value="$my_ip"
# - occ config:system:set trusted_domains 2 --value="{{ hostname }}"