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:
June 2025-02-18 05:43:39 +01:00
parent 89f3e55eac
commit 7420ed6010
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
5 changed files with 20 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,6 @@
- name: Ensure nginx is installed
ansible.builtin.apt:
name: nginx
state: present
update_cache: true
become: true