vhost conf file update now conditionnal

This commit is contained in:
2021-09-24 07:37:25 +02:00
parent f68cb1c867
commit 9b0f95946c
3 changed files with 4 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ apache_ssl_chain: /etc/letsencrypt/live/{{ apache_server_name }}/fullchain.pem
apache_ssl_key: /etc/letsencrypt/live/{{ apache_server_name }}/privkey.pem
apache_user: {{ apache_server_name | regex_search( '([^.]+)' ) }} }}
apache_allowoverride: all
apache_update_conf: true - wether we override existing config file
Example Playbook
----------------

View File

@@ -16,3 +16,4 @@ apache_use_ssl: true
apache_use_stats: true
apache_use_zabbix: true
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }} }}"
apache_update_conf: true

View File

@@ -46,7 +46,7 @@
- name: dns setup
include_tasks: dns.yml
when: apache_use_dns is defined
when: apache_use_dns
- name: generate cert
import_tasks: certbot.yml
@@ -59,6 +59,7 @@
dest: /etc/httpd/conf.d/{{ apache_server_name }}.conf
mode: 0644
notify: restart apache
when: apache_update_conf
- name: logrotate config file
template: