2021-08-07 16:46:17 +02:00
|
|
|
---
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: "Configuration | Setze Variable"
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
nextcloud_install_path: "{{ nextcloud_root }}/{{ instances.name }}"
|
|
|
|
|
|
|
|
- name: "Configuration | Richte cron-Job ein | {{ instances.name }}"
|
2022-12-31 13:37:28 +01:00
|
|
|
ansible.builtin.cron:
|
2023-05-21 23:01:31 +02:00
|
|
|
name: "nextcloud {{ instances.name }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
minute: "*/5"
|
2023-05-21 23:01:31 +02:00
|
|
|
user: "{{ instances.user }}"
|
|
|
|
job: "php -f {{ nextcloud_install_path }}/cron.php"
|
2021-08-07 16:46:17 +02:00
|
|
|
cron_file: "nextcloud"
|
|
|
|
|
2023-10-22 20:29:30 +02:00
|
|
|
- name: "Configuration | Aktualisiere htaccess-Datei | {{ instances.name }}"
|
2023-05-21 23:01:31 +02:00
|
|
|
ansible.builtin.command:
|
2023-10-22 20:29:30 +02:00
|
|
|
cmd: "php occ maintenance:update:htaccess --quiet"
|
2023-05-21 23:01:31 +02:00
|
|
|
chdir: "{{ nextcloud_install_path }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
become: true
|
2023-05-21 23:01:31 +02:00
|
|
|
become_user: "{{ instances.user }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
changed_when: true
|
|
|
|
|
2023-10-22 20:29:30 +02:00
|
|
|
- name: "Configuration | Erstelle Konfiguration | {{ instances.name }}"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: config.json.j2
|
|
|
|
dest: "/tmp/{{ instances.name }}_config.json"
|
|
|
|
mode: "0644"
|
2021-08-07 16:46:17 +02:00
|
|
|
|
2023-10-22 20:29:30 +02:00
|
|
|
- name: "Configuration | Importiere Konfuration | {{ instances.name }}"
|
2023-05-21 23:01:31 +02:00
|
|
|
ansible.builtin.command:
|
2023-10-22 20:29:30 +02:00
|
|
|
cmd: "php occ config:import /tmp/{{ instances.name }}_config.json --quiet"
|
2023-05-21 23:01:31 +02:00
|
|
|
chdir: "{{ nextcloud_install_path }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
become: true
|
2023-05-21 23:01:31 +02:00
|
|
|
become_user: "{{ instances.user }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
changed_when: true
|