nginx(role): split up repo setup and install task lists to estab. conv.
Split up repo setup and package installation after all to establish this as a convention (its already done this way in the docker role and was done this way in the nginx role before) to highlight that an external repo is used.
This commit is contained in:
parent
89f3e55eac
commit
7420ed6010
5 changed files with 20 additions and 12 deletions
playbooks
roles/nginx/tasks
|
@ -1,10 +1,15 @@
|
|||
- name: Ensure nginx install on nginx_hosts and nextcloud_hosts
|
||||
- name: Ensure NGINX repo setup and nginx install on nginx_hosts and nextcloud_hosts
|
||||
hosts: nginx_hosts:nextcloud_hosts
|
||||
tasks:
|
||||
- name: Ensure NGINX is installed
|
||||
- name: Ensure NGINX repo is setup
|
||||
ansible.builtin.include_role:
|
||||
name: nginx
|
||||
tasks_from: main/02_nginx_install.yaml
|
||||
tasks_from: main/02_repo_setup.yaml
|
||||
|
||||
- name: Ensure nginx is installed
|
||||
ansible.builtin.include_role:
|
||||
name: nginx
|
||||
tasks_from: main/03_nginx_install.yaml
|
||||
|
||||
- name: Make Sure System Package Are Up-To-Date for all non-hypervisors
|
||||
hosts: all:!hypervisors
|
||||
|
|
|
@ -2,10 +2,14 @@
|
|||
ansible.builtin.import_tasks:
|
||||
file: main/01_validate_config_names.yaml
|
||||
|
||||
- name: Ensure NGINX repo is set up
|
||||
ansible.builtin.import_tasks:
|
||||
file: main/02_repo_setup.yaml
|
||||
|
||||
- name: Ensure nginx is installed
|
||||
ansible.builtin.import_tasks:
|
||||
file: main/02_nginx_install.yaml
|
||||
file: main/03_nginx_install.yaml
|
||||
|
||||
- name: Ensure configuration deployment
|
||||
ansible.builtin.import_tasks:
|
||||
file: main/03_config_deploy.yaml
|
||||
file: main/04_config_deploy.yaml
|
||||
|
|
|
@ -37,10 +37,3 @@
|
|||
group: root
|
||||
mode: "0644"
|
||||
become: true
|
||||
|
||||
- name: Ensure nginx is installed
|
||||
ansible.builtin.apt:
|
||||
name: nginx
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
6
roles/nginx/tasks/main/03_nginx_install.yaml
Normal file
6
roles/nginx/tasks/main/03_nginx_install.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- name: Ensure nginx is installed
|
||||
ansible.builtin.apt:
|
||||
name: nginx
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue