2020-12-24 14:27:31 +01:00
|
|
|
---
|
|
|
|
- name: install nginx
|
|
|
|
pacman: name=nginx state=present
|
|
|
|
notify: restart nginx
|
|
|
|
|
2023-12-12 12:32:35 +01:00
|
|
|
- name: Ensure nginx configuration directories are present
|
2020-12-24 14:27:31 +01:00
|
|
|
file:
|
2023-12-12 12:32:35 +01:00
|
|
|
path: "{{ item }}"
|
2020-12-24 14:27:31 +01:00
|
|
|
state: directory
|
2023-12-12 12:32:35 +01:00
|
|
|
mode: '0755'
|
|
|
|
loop:
|
|
|
|
- "{{nginx_servers_directory}}"
|
|
|
|
- "{{nginx_maps_directory}}"
|
|
|
|
- "{{nginx_upstreams_directory}}"
|
2020-12-24 14:27:31 +01:00
|
|
|
|
|
|
|
- name: create nginx config file
|
2021-01-01 21:44:34 +01:00
|
|
|
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
|
2020-12-24 14:27:31 +01:00
|
|
|
notify: restart nginx
|
|
|
|
|
|
|
|
- name: flush nginx service
|
|
|
|
meta: flush_handlers
|