mirror of
https://github.com/DO1JLR/ansible_role_nginx.git
synced 2024-08-16 16:19:48 +02:00
L3D
7d5e029961
+ Improved some linting + Using FQCN more often + Using absolute path in template copy SOLVE Issue https://github.com/DO1JLR/ansible_role_nginx/issues/2
37 lines
994 B
YAML
37 lines
994 B
YAML
---
|
|
- name: Simple versionscheck
|
|
ansible.builtin.include_tasks: versioncheck.yml
|
|
when: submodules_versioncheck | bool
|
|
|
|
- name: Install nginx
|
|
ansible.builtin.include_tasks: installation.yml
|
|
|
|
- name: Create nginx user and group
|
|
ansible.builtin.include_tasks: users.yml
|
|
|
|
- name: Configure nginx
|
|
ansible.builtin.include_tasks: nginx.yml
|
|
|
|
- name: Start nginx webserver
|
|
ansible.builtin.systemd:
|
|
name: nginx
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Configure nginx default site
|
|
ansible.builtin.include_tasks: default_site.yml
|
|
when: nginx__infrastructure_domain__enabled | bool
|
|
|
|
- name: Configure nginx sites
|
|
ansible.builtin.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
|
|
ansible.builtin.meta: flush_handlers
|
|
|
|
- name: Configure acmetool and obtain certificates
|
|
ansible.builtin.include_tasks: acme.yml
|
|
when: nginx__acmetool_enabled
|