--- - name: Task name stat: path: /var/www/{{ vhost_name }}/wp-config.php register: project_config - name: Copy Configuration file template: src: files/wp-config.php.j2 dest: /var/www/{{ vhost_name }}/wp-config.php when: not project_config.stat.exists