40 lines
712 B
YAML
40 lines
712 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 letsencrypt.conf
|
|
template:
|
|
src: letsencrypt.conf.j2
|
|
dest: /etc/nginx/include/letsencrypt.conf
|
|
|
|
- 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
|