- name: Check for deployment tasks include_tasks: "{{ _dt }}" when: _dt != "" vars: _dt: "{{ lookup('first_found', dict(files=[config+'.yaml']), errors='ignore') }}" - name: Add {{ config }} configuration copy: src: '{{ config }}.conf' dest: /etc/apache2/sites-available/ owner: root group: root mode: 0644 - name: 'Enable {{ config }}' command: 'a2ensite {{ config }}' args: creates: '/etc/apache2/sites-enabled/{{ config }}' notify: - Reload apache2