ansible-config/roles/nginx/tasks/main.yml

35 lines
590 B
YAML
Raw Normal View History

2015-08-29 23:44:14 +02:00
---
- name: install nginx
apt:
name: nginx
state: present
2015-08-29 23:44:14 +02:00
tags: nginx
- name: disable default site
file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: restart nginx
2015-08-29 23:44:14 +02:00
tags: nginx
- name: copy includes
copy:
src: etc/nginx/include
dest: /etc/nginx
mode: 0644
owner: root
group: root
notify: restart nginx
2015-08-29 23:44:14 +02:00
tags: nginx
2017-02-10 20:38:12 +01:00
- name: template nginx.conf
template:
src: templates/nginx.conf.j2
dest: /etc/nginx/nginx.conf
mode: 0644
owner: root
group: root
backup: yes
notify: restart nginx
2015-08-29 23:44:14 +02:00
tags: nginx