]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/roles/add-apache-vhost/tasks/main.yml
Feat: Add `changed_when`
[ansible.git] / playbooks / debian / roles / add-apache-vhost / tasks / main.yml
index 7a441497696804bca3a35bfa7c686869f9e7f190..2f0e03a9209a0e0f3f549d19ee8fe91c15be81fb 100644 (file)
@@ -2,6 +2,7 @@
   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