Remove legacy nginx.conf path

This commit is contained in:
Dryusdan 2024-01-24 18:07:01 +01:00
parent 1c061d1899
commit 704cf89990
1 changed files with 15 additions and 2 deletions

View File

@ -144,7 +144,6 @@
mode: '0640'
loop:
- { 'src': 'etc/logrotate.d/nginx', 'dest':'/etc/logrotate.d/nginx' }
- { 'src': 'etc/systemd/system/nginx.service', 'dest':'/etc/systemd/system/nginx.service' }
- { 'src': 'etc/nginx/html/index.html', 'dest': '/etc/nginx/html/index.html' }
- { 'src': 'etc/nginx/html/50x.html', 'dest': '/etc/nginx/html/50x.html' }
- { 'src': 'etc/nginx/conf.d/blacklist', 'dest': '/etc/nginx/conf.d/blacklist' }
@ -166,6 +165,20 @@
- install
- reconfigure
- name: "Remove legacy Dryusdan's configuration"
ansible.builtin.file:
path: "{{ item }}"
owner: root
group: root
mode: '0640'
state: absent
loop:
- /etc/systemd/system/nginx.service'
- /etc/nginx/conf/nginx.conf
tags:
- install
- reconfigure
- name: Add templated configuration
template:
src: "{{ item.src }}"
@ -176,7 +189,7 @@
loop:
- { 'src': 'default.j2', 'dest': '/etc/nginx/sites-available/default' }
- { 'src': 'ocsp.conf.j2', 'dest': '/etc/nginx/conf.d/ocsp.conf' }
- { 'src': 'nginx.conf.j2', 'dest': '/etc/nginx/conf/nginx.conf' }
- { 'src': 'nginx.conf.j2', 'dest': '/etc/nginx/nginx.conf' }
tags:
- install
- reconfigure