Add nginx role

This commit is contained in:
Ryan Cavicchioni 2019-10-27 18:32:25 -05:00
parent 761a515e0f
commit 7e6e1e157c
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
nginx_package_name: nginx
nginx_package_state: present
nginx_service_name: nginx
nginx_service_state: started
nginx_service_enabled: yes

View File

@ -0,0 +1,14 @@
---
- name: reload nginx
service:
name: "{{ nginx_service_name }}"
state: reloaded
when: nginx_service_enabled
- name: restart nginx
service:
name: "{{ nginx_service_name }}"
state: restarted
when: nginx_service_enabled
# vim:ft=yaml.ansible:

View File

@ -0,0 +1,19 @@
---
- name: install passlib
package:
name: "{{ item }}"
state: present
loop:
- python-passlib
- python3-passlib
- name: install package
package:
name: "{{ nginx_package_name }}"
state: "{{ nginx_package_state }}"
- name: manage service
service:
name: "{{ nginx_service_name }}"
state: "{{ nginx_service_state }}"
enabled: "{{ nginx_service_enabled }}"