ansible-roles/webapps/evoadmin-mail/tasks/apache.yml
Jérémy Lecour 2ed77c60f0 Improve Ansible syntax
replace « x | changed » by « x is changed »
add explicit « bool » filter
use « length » filter instead of string comparison
2021-05-09 23:06:42 +02:00

28 lines
685 B
YAML

---
- name: Install evoadminmail VHost
template:
src: apache_evoadminmail.conf.j2
dest: /etc/apache2/sites-available/evoadminmail.conf
notify: reload apache2
tags:
- evoadmin-mail
- name: Enable evoadminmail vhost
file:
src: "/etc/apache2/sites-available/evoadminmail.conf"
dest: "/etc/apache2/sites-enabled/evoadminmail.conf"
state: link
notify: reload apache2
when: evoadminmail_enable_vhost | bool
tags:
- evoadmin-mail
- name: Disable evoadminmail vhost
file:
dest: "/etc/apache2/sites-enabled/evoadminmail.conf"
state: absent
notify: reload apache2
when: not (evoadminmail_enable_vhost | bool)
tags:
- evoadmin-mail