Moving common vars for role to vars/main.yaml
This commit is contained in:
parent
053db8793b
commit
4a0a12242a
@ -1,9 +1,5 @@
|
|||||||
- name: Reverse proxy role configuration
|
- name: Reverse proxy role configuration
|
||||||
become: true
|
become: true
|
||||||
vars:
|
|
||||||
nginx_configs:
|
|
||||||
- nomad.conf
|
|
||||||
- ncr.conf
|
|
||||||
block:
|
block:
|
||||||
- name: Ensure /etc/hosts are up to date
|
- name: Ensure /etc/hosts are up to date
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@ -18,14 +14,14 @@
|
|||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "/etc/nginx/sites-available/{{ item }}"
|
dest: "/etc/nginx/sites-available/{{ item }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ nginx_configs }}"
|
loop: "{{ proxy_nginx_configs }}"
|
||||||
- name: Link the nomad.conf to sites-enabled
|
- name: Link the nomad.conf to sites-enabled
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/etc/nginx/sites-enabled/{{ item }}"
|
path: "/etc/nginx/sites-enabled/{{ item }}"
|
||||||
state: link
|
state: link
|
||||||
src: "/etc/nginx/sites-available/{{ item }}"
|
src: "/etc/nginx/sites-available/{{ item }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ nginx_configs }}"
|
loop: "{{ proxy_nginx_configs }}"
|
||||||
- name: Restart nginx
|
- name: Restart nginx
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: nginx
|
name: nginx
|
||||||
|
3
ansible/roles/proxy/vars/main.yaml
Normal file
3
ansible/roles/proxy/vars/main.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
proxy_nginx_configs:
|
||||||
|
- nomad.conf
|
||||||
|
- ncr.conf
|
Loading…
Reference in New Issue
Block a user