]> 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 666cd77d7ce9c15a0d0fdee7cf880cba929bfb32..2f0e03a9209a0e0f3f549d19ee8fe91c15be81fb 100644 (file)
@@ -2,11 +2,12 @@
   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
-  when: not vhost_conf.stats.exists
+  when: not vhost_conf.stat.exists
 
 - name: Run dehydrated for the vhost
   import_tasks: dehydrated.yml
-  when: not vhost_conf.stats.exists
+  when: not vhost_conf.stat.exists