Prevented execution of ssl tasks on VM

This commit is contained in:
Jim Martens 2020-01-03 22:14:33 +01:00
parent 674d1efb8a
commit 2c2e4a103d
1 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,15 @@
owner: root
group: root
mode: 0644
when: ansible_domain != 'dev'
- name: add development collabora http site
template:
src: etc/apache2/sites-available/dev.conf.j2
dest: /etc/apache2/sites-available/{{ ansible_domain }}.conf
owner: root
group: root
mode: 0644
when: ansible_domain == 'dev'
- name: disable default site and enable collabora site
block:
- name: disable default site
@ -17,7 +26,8 @@
notify: reload apache
- name: run certbot
command:
cmd: certbot --apache --non-interactive --keep-until-expiring --no-eff-email --redirect --renew-with-new-domains --agree-tos -d {{ ansible_domain }}
cmd: certbot --apache --non-interactive --keep-until-expiring --no-eff-email --email {{ admin_mail }} --redirect --renew-with-new-domains --agree-tos -d {{ ansible_domain }}
when: ansible_domain != 'dev'
- name: add collabora https site
template:
src: etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2
@ -25,7 +35,9 @@
owner: root
group: root
mode: 0644
when: ansible_domain != 'dev'
- name: enable collabora https site
command:
cmd: a2ensite {{ ansible_domain }}-le-ssl.conf
when: ansible_domain != 'dev'
notify: restart apache