# # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/fetch_module.html # # - need to play with looping thru items # --- - name: "15 - custom ansible - fetch file" hosts: dev become: yes # Run tasks with root/sudo privileges tasks: - name: pull sshd config ansible.builtin.fetch: src: /etc/ssh/sshd_config dest: ~/repos/ansible_repo/ansible-practice/system/ tags: ['fetch_sshd_config'] - name: pull sshd config ansible.builtin.fetch: src: /etc/rc.d/rc.firewall dest: ~/repos/ansible_repo/ansible-practice/system/ tags: ['fetch_firewall_config']