ansible-roles/evoacme/tasks/main.yml

43 lines
792 B
YAML
Raw Normal View History

---
2017-03-24 14:06:05 +01:00
2017-08-23 01:49:27 +02:00
- fail:
msg: only compatible with Debian >= 8
2017-03-24 14:06:05 +01:00
when:
- ansible_distribution != "Debian" or ansible_distribution_major_version is version('8', '<')
2017-03-24 14:06:05 +01:00
2017-05-19 22:31:32 +02:00
- include: certbot.yml
2016-12-16 16:18:19 +01:00
2017-05-19 22:31:32 +02:00
- include: acme.yml
2016-12-16 16:18:19 +01:00
2017-11-15 11:17:58 +01:00
- include: evoacme_hook.yml
vars:
hook_name: "{{ item }}"
with_items:
- reload_apache
- reload_nginx
- reload_dovecot
- reload_postfix
- commit
2017-11-15 11:17:58 +01:00
2017-05-19 22:31:32 +02:00
- include: conf.yml
2016-12-16 16:18:19 +01:00
2017-05-19 22:31:32 +02:00
- include: scripts.yml
2016-12-16 16:18:19 +01:00
- name: Determine Apache presence
stat:
path: /etc/apache2/apache2.conf
check_mode: no
register: sta
- name: Determine Nginx presence
stat:
path: /etc/nginx/nginx.conf
check_mode: no
register: stn
2016-12-16 16:18:19 +01:00
2017-05-19 22:31:32 +02:00
- include: apache.yml
2016-12-16 16:18:19 +01:00
when: sta.stat.isreg is defined and sta.stat.isreg
2017-05-19 22:31:32 +02:00
- include: nginx.yml
2016-12-16 16:18:19 +01:00
when: stn.stat.isreg is defined and stn.stat.isreg