2020-11-02 04:51:35 +01:00
|
|
|
---
|
2021-02-04 14:43:54 +01:00
|
|
|
- name: simple versionscheck
|
|
|
|
include_tasks: versioncheck.yml
|
|
|
|
when: submodules_versioncheck | bool
|
|
|
|
|
2020-11-02 04:51:35 +01:00
|
|
|
- name: Install nginx
|
|
|
|
include_tasks: installation.yml
|
|
|
|
|
|
|
|
- name: Configure nginx
|
|
|
|
include_tasks: nginx.yml
|
|
|
|
|
2021-02-04 16:01:30 +01:00
|
|
|
- name: start nginx webserver
|
|
|
|
ansible.builtin.systemd:
|
2020-11-02 04:51:35 +01:00
|
|
|
name: nginx
|
|
|
|
state: started
|
2021-02-04 16:01:30 +01:00
|
|
|
enabled: true
|
2020-11-02 04:51:35 +01:00
|
|
|
|
2021-02-04 16:01:30 +01:00
|
|
|
- name: configure nginx default site
|
2020-11-02 04:51:35 +01:00
|
|
|
include_tasks: default_site.yml
|
2021-02-04 16:01:30 +01:00
|
|
|
when: nginx__infrastructure_domain__enabled | bool
|
2020-11-02 04:51:35 +01:00
|
|
|
|
|
|
|
- name: Configure nginx sites
|
|
|
|
include_tasks: single_site.yml
|
|
|
|
with_items: '{{ nginx_sites }}'
|
|
|
|
loop_control:
|
|
|
|
loop_var: site
|
|
|
|
|
2020-11-04 06:00:44 +01:00
|
|
|
# Restart nginx before doing acme stuff
|
|
|
|
- name: Flush handlers to restart nginx now
|
|
|
|
meta: flush_handlers
|
|
|
|
|
2020-11-02 04:51:35 +01:00
|
|
|
- name: Configure acmetool and obtain certificates
|
|
|
|
include_tasks: acme.yml
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
- acme
|