--- - name: Deploy snakeoil.crt ansible.builtin.copy: src: cert/true-snakeoil.crt dest: /etc/ssl/private/true-snakeoil.crt owner: root group: root mode: '0644' - name: Deploy snakeoil.key ansible.builtin.copy: src: cert/true-snakeoil.key dest: /etc/ssl/private/true-snakeoil.key owner: root group: root mode: '0640' - name: Deploy defence.conf ansible.builtin.copy: src: sites-available/00-defence.conf dest: /etc/apache2/sites-available/00-defence.conf owner: root group: root mode: '0644' notify: Reload apache2 - name: Deploy conf configuration ansible.builtin.copy: src: "{{ item }}" dest: "/etc/apache2/conf-available/" owner: root group: root mode: '0644' loop: "{{ query('ansible.builtin.fileglob', 'conf-available/*') }}" notify: Reload apache2 - name: Deploy sites configuration ansible.builtin.copy: src: "{{ item }}" dest: "/etc/apache2/sites-available/" owner: root group: root mode: '0644' loop: "{{ query('ansible.builtin.fileglob', 'sites-available/' ~ inventory_hostname ~ '/*') }}" notify: Reload apache2