ansible/roles/nginx/tasks/main.yml

29 lines
585 B
YAML

---
- 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: configure default virtual host
template:
src: default.j2
dest: /etc/nginx/sites-available/default
owner: root
group: root
mode: 0644
notify: reload nginx
- name: manage service
service:
name: "{{ nginx_service_name }}"
state: "{{ nginx_service_state }}"
enabled: "{{ nginx_service_enabled }}"