2021-09-13 18:11:04 +02:00
|
|
|
- name: be sure nginx is installed
|
|
|
|
apt:
|
|
|
|
name: nginx
|
|
|
|
|
2021-09-23 23:29:40 +02:00
|
|
|
- name: be sure the nginx files are present
|
2021-09-13 18:11:04 +02:00
|
|
|
copy:
|
2021-09-23 23:29:40 +02:00
|
|
|
src: "../files/{{ item }}"
|
|
|
|
dest: "/etc/nginx/{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- nginx.conf
|
|
|
|
- kipasswd
|
2021-09-13 18:11:04 +02:00
|
|
|
|
|
|
|
- name: be sure nginx site config files are present
|
|
|
|
template:
|
|
|
|
src: sites/{{ item }}.conf.j2
|
|
|
|
dest: /etc/nginx/sites-enabled/{{ item }}.conf
|
|
|
|
with_items:
|
|
|
|
- ki
|
|
|
|
notify:
|
|
|
|
- "nginx config changed"
|
|
|
|
|
|
|
|
- name: be sure nginx sites are not present
|
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
path: "/etc/nginx/sites-enabled/{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- default
|
|
|
|
notify:
|
|
|
|
- "nginx config changed"
|