2020-12-03 15:52:14 +01:00
|
|
|
---
|
2023-05-21 23:01:31 +02:00
|
|
|
- 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
|
2023-10-22 21:41:16 +02:00
|
|
|
tags: always
|
2023-05-21 23:01:31 +02:00
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
delegate_to: "{{ gateway_host }}"
|
2023-10-22 21:41:16 +02:00
|
|
|
tags: gateway
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
|
|
|
|
|
|
|
- name: Run database tasks
|
|
|
|
ansible.builtin.include_tasks: database.yml
|
2023-10-22 20:48:17 +02:00
|
|
|
tags: always
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
2023-10-22 20:48:17 +02:00
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
delegate_to: "{{ database_host }}"
|
|
|
|
tags: database
|
2021-12-21 22:47:24 +01:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Run user tasks
|
|
|
|
ansible.builtin.include_tasks: user.yml
|
2023-10-22 21:41:16 +02:00
|
|
|
tags: always
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
2023-10-22 21:41:16 +02:00
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
tags: user
|
2022-07-26 16:44:42 +02:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Run php tasks
|
|
|
|
ansible.builtin.include_tasks: php.yml
|
2023-06-28 19:05:29 +02:00
|
|
|
tags: always
|
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
tags: phpfpm
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
2021-12-21 22:47:24 +01:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Run Hiddenservice tasks
|
|
|
|
ansible.builtin.include_tasks: hiddenservice.yml
|
2023-10-22 20:29:30 +02:00
|
|
|
tags: always
|
2023-10-22 21:41:16 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
2023-10-22 20:29:30 +02:00
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
tags: hiddenservice
|
2023-10-22 21:41:16 +02:00
|
|
|
when: item.hiddenservice is defined
|
2023-05-21 16:01:21 +02:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Run Webserver tasks
|
|
|
|
ansible.builtin.import_tasks: apache.yml
|
2021-10-14 16:09:47 +02:00
|
|
|
tags: apache
|
2021-06-26 01:45:06 +02:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Installation
|
|
|
|
ansible.builtin.include_tasks: nextcloud.yml
|
|
|
|
loop: "{{ nextcloud_instances }}"
|
2021-06-26 01:45:06 +02:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Configure Nextcloud
|
|
|
|
ansible.builtin.include_tasks: configuration.yml
|
2023-10-22 21:47:36 +02:00
|
|
|
tags: always
|
2023-08-04 13:34:56 +02:00
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
tags: configuration
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: instances
|
|
|
|
index_var: instance_id
|
2021-12-21 22:47:24 +01:00
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: Configure Fail2ban
|
|
|
|
ansible.builtin.include_tasks: fail2ban.yml
|
2023-10-22 21:47:36 +02:00
|
|
|
tags: always
|
|
|
|
args:
|
|
|
|
apply:
|
|
|
|
tags: fail2ban
|
2023-05-21 23:01:31 +02:00
|
|
|
loop: "{{ nextcloud_instances }}"
|