ansible-infra/maintenance.yaml
June abc738c9c2
All checks were successful
/ Ansible Lint (push) Successful in 1m33s
flatten the "playbooks" directory for better structure
Because of how Ansible local relative search paths work, the global
"files" and "templates" directories need to be next to the playbooks.
However its not intuitive to look into the playbooks directory to find
the files and templates for a host.
Therefore flatten the playbooks directory to get rid of this confusing
structure.

Also see:
https://docs.ansible.com/ansible/latest/playbook_guide/playbook_pathing.html#resolving-local-relative-paths
2024-12-02 00:48:19 +01:00

35 lines
1,003 B
YAML

- name: Ensure NGINX repo and install on nginx_hosts
hosts: nginx_hosts
tasks:
- name: make sure NGINX repos are setup
ansible.builtin.include_role:
name: nginx
tasks_from: main/repo_setup
- name: make sure NGINX is installed
ansible.builtin.include_role:
name: nginx
tasks_from: main/nginx_install
- name: Ensure NGINX repo and install on nextcloud_hosts
hosts: nextcloud_hosts:!nginx_hosts
tasks:
- name: make sure NGINX repos are setup
ansible.builtin.include_role:
name: nginx
tasks_from: main/repo_setup
- name: make sure NGINX is installed
ansible.builtin.include_role:
name: nginx
tasks_from: main/nginx_install
vars:
nginx__version_spec: "{{ nextcloud__nginx_version_spec | default('') }}"
- name: Make Sure System Package Are Up-To-Date
hosts: all
roles:
- apt_update_and_upgrade
- name: Run deploy Playbook
ansible.builtin.import_playbook: deploy.yaml