ansible-role-nextcloud/tasks/configuration.yml

34 lines
1.2 KiB
YAML

---
- name: "Configuration | Setze Variable"
ansible.builtin.set_fact:
nextcloud_install_path: "{{ nextcloud_root }}/{{ instances.name }}"
- name: "Configuration | Richte cron-Job ein | {{ instances.name }}"
ansible.builtin.cron:
name: "nextcloud {{ instances.name }}"
minute: "*/5"
user: "{{ instances.user }}"
job: "php -f {{ nextcloud_install_path }}/cron.php"
cron_file: "nextcloud"
- name: "Configuration | Aktualisiere htaccess-Datei | {{ instances.name }}"
ansible.builtin.command:
cmd: "php occ maintenance:update:htaccess --quiet"
chdir: "{{ nextcloud_install_path }}"
become: true
become_user: "{{ instances.user }}"
changed_when: true
- name: "Configuration | Erstelle Konfiguration | {{ instances.name }}"
ansible.builtin.template:
src: config.json.j2
dest: "/tmp/{{ instances.name }}_config.json"
mode: "0644"
- name: "Configuration | Importiere Konfiguration | {{ instances.name }}"
ansible.builtin.command:
cmd: "php occ config:import /tmp/{{ instances.name }}_config.json --quiet"
chdir: "{{ nextcloud_install_path }}"
become: true
become_user: "{{ instances.user }}"
changed_when: true