ansible-role-nextcloud/tasks/hiddenservice.yml

24 lines
983 B
YAML
Raw Normal View History

---
- name: "Hiddenservice | Richte Hiddenservice ein | {{ item.name }}"
ansible.builtin.import_role:
name: configure-hiddenservice
delegate_to: "{{ onion_host }}"
when: item.config.hiddenservice is defined and item.config.hiddenservice
- name: "Hiddenservice | Kopiere Apache-Anpassungen | {{ item.name }}"
ansible.builtin.template:
src: templates/apache2/custom.conf.j2
dest: "/etc/apache2/conf-available/{{ item.name }}.conf"
mode: "0644"
notify: reload apache
# Das erste Argument gibt den Platz im Array an, beginnend mit 0.
- name: "Hiddenservice | Richte trusted domains ein | {{ item.name }}"
ansible.builtin.command:
cmd: 'php occ config:system:set trusted_domains {{ item.config.trusted_domains | length }} --value "{{ hiddenservice_address.stdout }}"'
chdir: "{{ nextcloud_install_path }}"
become: true
become_user: "{{ item.user }}"
changed_when: true
when: item.config.hiddenservice is defined and item.config.hiddenservice