1
0
Fork 0
mirror of https://github.com/DO1JLR/ansible_role_nginx.git synced 2024-08-16 16:19:48 +02:00
ansible_role_nginx/tasks/main.yml

34 lines
802 B
YAML

---
- name: simple versionscheck
include_tasks: versioncheck.yml
when: submodules_versioncheck | bool
- name: Install nginx
include_tasks: installation.yml
- name: Configure nginx
include_tasks: nginx.yml
- name: start nginx webserver
ansible.builtin.systemd:
name: nginx
state: started
enabled: true
- name: configure nginx default site
include_tasks: default_site.yml
when: nginx__infrastructure_domain__enabled | bool
- name: Configure nginx sites
include_tasks: single_site.yml
with_items: '{{ nginx_sites }}'
loop_control:
loop_var: site
# Restart nginx before doing acme stuff
- name: Flush handlers to restart nginx now
meta: flush_handlers
- name: Configure acmetool and obtain certificates
include_tasks: acme.yml
when: nginx__acmetool_enabled