82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
---
|
|
- name: Run common tasks
|
|
ansible.builtin.import_tasks: common.yml
|
|
tags: common
|
|
|
|
- name: Install packages
|
|
ansible.builtin.import_tasks: packages.yml
|
|
tags: packages
|
|
|
|
- name: Redis
|
|
ansible.builtin.import_tasks: redis.yml
|
|
tags: redis
|
|
|
|
- name: Setup Gateway
|
|
ansible.builtin.include_tasks: gateway.yml
|
|
tags: always
|
|
args:
|
|
apply:
|
|
delegate_to: "{{ gateway_host }}"
|
|
tags: gateway
|
|
loop: "{{ nextcloud_instances }}"
|
|
|
|
- name: Run database tasks
|
|
ansible.builtin.include_tasks: database.yml
|
|
tags: always
|
|
loop: "{{ nextcloud_instances }}"
|
|
args:
|
|
apply:
|
|
delegate_to: "{{ database_host }}"
|
|
tags: database
|
|
|
|
- name: Run user tasks
|
|
ansible.builtin.include_tasks: user.yml
|
|
tags: always
|
|
loop: "{{ nextcloud_instances }}"
|
|
args:
|
|
apply:
|
|
tags: user
|
|
|
|
- name: Run php tasks
|
|
ansible.builtin.include_tasks: php.yml
|
|
tags: always
|
|
args:
|
|
apply:
|
|
tags: phpfpm
|
|
loop: "{{ nextcloud_instances }}"
|
|
|
|
- name: Run Hiddenservice tasks
|
|
ansible.builtin.include_tasks: hiddenservice.yml
|
|
tags: always
|
|
loop: "{{ nextcloud_instances }}"
|
|
args:
|
|
apply:
|
|
tags: hiddenservice
|
|
when: item.hiddenservice is defined
|
|
|
|
- name: Run Webserver tasks
|
|
ansible.builtin.import_tasks: webserver.yml
|
|
tags: webserver
|
|
|
|
- name: Installation
|
|
ansible.builtin.include_tasks: nextcloud.yml
|
|
loop: "{{ nextcloud_instances }}"
|
|
|
|
- name: Configure Nextcloud
|
|
ansible.builtin.include_tasks: configuration.yml
|
|
tags: always
|
|
args:
|
|
apply:
|
|
tags: configuration
|
|
loop: "{{ nextcloud_instances }}"
|
|
loop_control:
|
|
loop_var: instances
|
|
index_var: instance_id
|
|
|
|
- name: Configure Fail2ban
|
|
ansible.builtin.include_tasks: fail2ban.yml
|
|
tags: always
|
|
args:
|
|
apply:
|
|
tags: fail2ban
|
|
loop: "{{ nextcloud_instances }}"
|