--- - name: Create swag-config directory file: path: "{{ item }}" owner: "{{ puid }}" group: "{{ pgid }}" state: directory loop: - "{{ swag_config }}" - name: Copy site-confs template: owner: "{{ puid }}" group: "{{ pgid }}" src: "{{ item }}" dest: "{{ swag_remote_site_confs }}" mode: '644' loop: "{{ swag_site_confs }}" become: true