- name: Check vhost stat: path: "/etc/apache2/sites-enabled/{{ virtual_host }}.conf" register: vhost_conf changed_when: not vhost_conf.stat.exists - block: - name: Add vhost import_tasks: add-vhost.yml - name: Run dehydrated for the vhost import_tasks: dehydrated.yml when: not vhost_conf.stat.exists