Stelle auf zentrale Instanzen-Verwaltung um

This commit is contained in:
phil 2021-06-26 01:14:24 +02:00
parent 212d7d950c
commit e63c995f11
5 changed files with 28 additions and 27 deletions

View file

@ -13,40 +13,41 @@
extra_opts:
- "--strip-components=1"
dest: "{{ nextcloud_install_path }}"
owner: "{{ common_name }}"
group: "{{ common_name }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: 0755
- name: "NC Installation"
command: >
php "{{ nextcloud_install_path }}"/occ maintenance:install --database "mysql"
--database-name "{{ nextcloud_mysql_db }}" --database-user "{{ nextcloud_mysql_user }}"
--database-pass "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters') }}" --database-host "{{ nextcloud_database_host }}"
--database-name "{{ database }}" --database-user "{{ database }}"
--database-pass "{{ lookup('password', '/tmp/nc_db_password chars=ascii_letters') }}" --database-host "{{ database_host }}"
--admin-user "{{ nextcloud_admin_user }}" --admin-pass "{{ nextcloud_admin_pw }}"
become: true
become_user: "{{ common_name }}"
become_user: "{{ user }}"
changed_when: true
#todo: Auch auf instances.alias anwenden
- name: "NC trusted domains einrichten"
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"'
become: true
become_user: "{{ common_name }}"
become_user: "{{ name }}"
changed_when: true
with_indexed_items:
- '{{ nextcloud_trusted_domains }}'
- name: "NC cron einrichten"
cron:
name: "nextcloud {{ nextcloud_domain }}"
name: "nextcloud {{ domain }}"
minute: "*/5"
user: "{{ common_name }}"
user: "{{ user }}"
job: "php -f {{ nextcloud_install_path}}/cron.php"
cron_file: "nextcloud"
- name: "NC allgemeie Konfiguration"
command: "{{ item }}"
become: true
become_user: "{{ common_name }}"
become_user: "{{ user }}"
changed_when: true
with_items:
- "php {{ nextcloud_install_path }}/occ app:enable encryption"
@ -54,7 +55,7 @@
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.local --value "\\OC\\Memcache\\APCu"'
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.distributed --value "\OC\Memcache\Redis"'
- "php {{ nextcloud_install_path }}/occ background:cron"
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ nextcloud_domain }}'
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ domain }}'
- 'php {{ nextcloud_install_path }}/occ config:system:set htaccess.RewriteBase --value /'
- 'php {{ nextcloud_install_path }}/occ maintenance:update:htaccess'
- 'php {{ nextcloud_install_path }}/occ config:system:set default_language --value "de"'
@ -92,7 +93,7 @@
- name: "NC trusted proxies einrichten"
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
become: true
become_user: "{{ common_name }}"
become_user: "{{ user }}"
changed_when: true
with_indexed_items:
- '{{ nextcloud_trusted_proxies }}'