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

40 lines
712 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-10-03 17:30:06 +02:00
- name: template letsencrypt.conf
template:
src: letsencrypt.conf.j2
dest: /etc/nginx/include/letsencrypt.conf
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