vhost conf file update now conditionnal
This commit is contained in:
@@ -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
|
||||
----------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user