stat:
path: "/etc/apache2/sites-enabled/{{ virtual_host }}.conf"
register: vhost_conf
+ changed_when: not vhost_conf.stat.exists
- name: Add vhost
import_tasks: add-vhost.yml
stat:
path: "/etc/bind/{{ domain }}"
register: domain_exists
+ changed_when: not domain_exists.stat.exists
- name: Copy domain template
become: true
stat:
path: /etc/apache2/conf-enabled/001-phd.conf
register: phd_conf
+ changed_when: not phd_conf.stat.exists
- debug:
msg: "apache has already been configured"
module: stat
path: /usr/local/src/LetsEncrypt/dehydrated/.git/config
register: dehydrated
+ changed_when: not dehydrated.stat.exists
- name: Install git
local_action: