introduce nginx role

This commit is contained in:
Matt Jia 2017-04-27 13:59:10 +10:00 committed by Ralph Bean
parent 88e9560a53
commit 2ab4b9be13
10 changed files with 314 additions and 0 deletions

View file

@ -0,0 +1,33 @@
- name: install nginx
dnf:
name: nginx
state: present
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes
- name: install nginx logrotation file
copy:
src: etc/logrotate.d/nginx
dest: /etc/logrotate.d/nginx
owner: root
group: root
mode: 0644
- name: install /etc/nginx/nginx.conf
template:
src: etc/nginx/nginx.conf.j2
dest: /etc/nginx/nginx.conf
owner: root
group: root
mode: 0644
notify: restart nginx
- name: install /etc/nginx/conf.d/default.conf
copy:
src: etc/nginx/conf.d/default.conf
dest: /etc/nginx/conf.d/default.conf
owner: root
group: root
mode: 0644
notify: restart nginx