introduce nginx role
This commit is contained in:
parent
88e9560a53
commit
2ab4b9be13
10 changed files with 314 additions and 0 deletions
33
roles/nginx/tasks/nginx.yml
Normal file
33
roles/nginx/tasks/nginx.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue