Make it possible to overwrite the default evoadmin-web templates #48
|
@ -13,6 +13,7 @@ The **patch** part changes incrementally at each release.
|
|||
### Added
|
||||
* apache: add server status suffix in VHost (and default site) if missing
|
||||
* nginx: add server status suffix in VHost (and default site) if missing
|
||||
* Overload evoadmin-web templates if needed
|
||||
|
||||
### Changed
|
||||
* evocheck : version 19.04 from upstream
|
||||
|
|
35
webapps/evoadmin-web/README.md
Normal file
35
webapps/evoadmin-web/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Set custom web-add.conf file
|
||||
- "templates/evoadmin-web/web-add.{{ inventory_hostname }}.conf.j2"
|
||||
- "templates/evoadmin-web/web-add.{{ host_group }}.conf.j2"
|
||||
- "templates/evoadmin-web/web-add.conf.j2"
|
||||
And force it to update:
|
||||
web_add_conf_force: True
|
||||
|
||||
# Set custom web-mail.tpl
|
||||
- "templates/evoadmin-web/web-mail.{{ inventory_hostname }}.tpl.j2"
|
||||
- "templates/evoadmin-web/web-mail.{{ host_group }}.tpl.j2"
|
||||
- "templates/evoadmin-web/web-mail.tpl.j2"
|
||||
And force it to update:
|
||||
web_mail_tpl_force: True
|
||||
|
||||
# Set custom evoadmin.conf VHost
|
||||
- "templates/evoadmin-web/evoadmin.{{ inventory_hostname }}.conf.j2"
|
||||
- "templates/evoadmin-web/evoadmin.{{ host_group }}.conf.j2"
|
||||
- "templates/evoadmin-web/evoadmin.conf.j2"
|
||||
And force it to update:
|
||||
evoadmin_force_vhost: True
|
||||
|
||||
# Set custom config.local.php
|
||||
- "templates/evoadmin-web/config.local.{{ inventory_hostname }}.php.j2"
|
||||
- "templates/evoadmin-web/config.local.{{ host_group }}.php.j2"
|
||||
- "templates/evoadmin-web/config.local.php.j2"
|
||||
And force it to update:
|
||||
evoadmin_web_config_local_php_force: True
|
||||
|
||||
# Set evoadmin-web sudoers file
|
||||
- "templates/evoadmin-web/sudoers.{{ inventory_hostname }}.j2"
|
||||
- "templates/evoadmin-web/sudoers.{{ host_group }}.j2"
|
||||
- "templates/evoadmin-web/sudoers.j2"
|
||||
- "sudoers.j2"
|
||||
And force it to update:
|
||||
evoadmin_web_sudoers_conf_force: True
|
|
@ -11,6 +11,11 @@ evoadmin_host: "evoadmin.{{ ansible_fqdn }}"
|
|||
evoadmin_username: evoadmin
|
||||
|
||||
evoadmin_enable_vhost: True
|
||||
evoadmin_force_vhost: False
|
||||
evoadmin_web_config_local_php_force: False
|
||||
evoadmin_web_sudoers_conf_force: False
|
||||
web_add_conf_force: False
|
||||
web_mail_tpl_force: False
|
||||
|
||||
|
||||
evoadmin_tpl_servername: "{{ ansible_fqdn }}"
|
||||
evoadmin_tpl_address: "{{ ansible_default_ipv4.address }}"
|
||||
|
|
|
@ -8,10 +8,24 @@
|
|||
|
||||
- name: Configure web-add config file
|
||||
template:
|
||||
src: web-add.conf.j2
|
||||
src: "{{ item }}"
|
||||
dest: /etc/evolinux/web-add.conf
|
||||
force: "{{ web_add_conf_force | bool }}"
|
||||
with_first_found:
|
||||
- "templates/evoadmin-web/web-add.{{ inventory_hostname }}.conf.j2"
|
||||
- "templates/evoadmin-web/web-add.{{ host_group }}.conf.j2"
|
||||
- "templates/evoadmin-web/web-add.conf.j2"
|
||||
- "web-add.conf.j2"
|
||||
register: web_add_conf_template
|
||||
|
||||
- name: Configure web-add template file for mail
|
||||
template:
|
||||
src: web-mail.tpl.j2
|
||||
src: "{{ item }}"
|
||||
dest: "{{ evoadmin_scripts_dir }}/web-mail.tpl"
|
||||
force: "{{ web_mail_tpl_force | bool }}"
|
||||
with_first_found:
|
||||
- "templates/evoadmin-web/web-mail.{{ inventory_hostname }}.tpl.j2"
|
||||
- "templates/evoadmin-web/web-mail.{{ host_group }}.tpl.j2"
|
||||
- "templates/evoadmin-web/web-mail.tpl.j2"
|
||||
- "web-mail.tpl.j2"
|
||||
register: web_mail_tpl_template
|
|
@ -103,7 +103,14 @@
|
|||
|
||||
- name: Add evoadmin sudoers file
|
||||
template:
|
||||
src: sudoers.j2
|
||||
src: "{{ item }}"
|
||||
dest: /etc/sudoers.d/evoadmin
|
||||
mode: "0600"
|
||||
force: "{{ evoadmin_web_sudoers_conf_force | bool }}"
|
||||
validate: "visudo -cf %s"
|
||||
with_first_found:
|
||||
- "templates/evoadmin-web/sudoers.{{ inventory_hostname }}.j2"
|
||||
- "templates/evoadmin-web/sudoers.{{ host_group }}.j2"
|
||||
- "templates/evoadmin-web/sudoers.j2"
|
||||
- "sudoers.j2"
|
||||
register: evoadmin_web_sudoers_conf
|
|
@ -20,8 +20,15 @@
|
|||
|
||||
- name: Install evoadmin VHost
|
||||
template:
|
||||
src: evoadmin.conf.j2
|
||||
src: "{{ item }}"
|
||||
dest: /etc/apache2/sites-available/evoadmin.conf
|
||||
force: "{{ evoadmin_force_vhost | bool }}"
|
||||
with_first_found:
|
||||
- "templates/evoadmin-web/evoadmin.{{ inventory_hostname }}.conf.j2"
|
||||
- "templates/evoadmin-web/evoadmin.{{ host_group }}.conf.j2"
|
||||
- "templates/evoadmin-web/evoadmin.conf.j2"
|
||||
- "evoadmin.conf.j2"
|
||||
register: evoadmin_vhost_template
|
||||
notify: reload apache2
|
||||
|
||||
- name: Enable evoadmin vhost
|
||||
|
@ -40,9 +47,15 @@
|
|||
|
||||
- name: Copy config file for evoadmin
|
||||
template:
|
||||
src: config.local.php.j2
|
||||
src: "{{ item }}"
|
||||
dest: "{{ evoadmin_document_root}}/conf/config.local.php"
|
||||
mode: "0640"
|
||||
owner: evoadmin
|
||||
group: evoadmin
|
||||
force: no
|
||||
force: "{{ evoadmin_web_config_local_php_force | bool }}"
|
||||
with_first_found:
|
||||
- "templates/evoadmin-web/config.local.{{ inventory_hostname }}.php.j2"
|
||||
- "templates/evoadmin-web/config.local.{{ host_group }}.php.j2"
|
||||
- "templates/evoadmin-web/config.local.php.j2"
|
||||
- "config.local.conf.j2"
|
||||
register: evoadmin_web_config_local_php_template
|
Loading…
Reference in a new issue
we should namespace all variables under
evoadmin