ansible-config/roles/nginx/tasks/main.yml
2017-02-10 22:19:12 +01:00

35 lines
590 B
YAML

---
- name: install nginx
apt:
name: nginx
state: present
tags: nginx
- name: disable default site
file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: restart nginx
tags: nginx
- name: copy includes
copy:
src: etc/nginx/include
dest: /etc/nginx
mode: 0644
owner: root
group: root
notify: restart nginx
tags: nginx
- 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
tags: nginx