--- - name: setup backup installation folder file: state: directory path: "{{ backup_inst }}" owner: "{{ backup_owner }}" group: "{{ backup_group }}" mode: "0755" - name: setup filter program for backup pruning copy: src: opt/backup/filter_backups dest: "{{ backup_home }}/.ssh/{{ item.file }}" owner: "{{ backup_owner }}" group: "{{ backup_group }}" mode: "0750" - name: setup ssh public keys of clients copy: content: "{{ backup_clients[item].sshpubkey }}" dest: "{{ backup_home }}/.ssh/{{ item }}.pub" owner: "{{ backup_owner }}" group: "{{ backup_group }}" mode: "0600" loop: "{{ backup_clients }}" - name: setup ssh private keys of clients copy: content: "{{ backup_clients[item].sshprivkey }}" dest: "{{ backup_home }}/.ssh/{{ item }}" owner: "{{ backup_owner }}" group: "{{ backup_group }}" mode: "0600" loop: "{{ backup_clients }}" - name: setup ssh config of clients template: src: "home/backup/.ssh/config.j2" dest: "{{ backup_home }}/.ssh/config" owner: "{{ backup_owner }}" group: "{{ backup_group }}" mode: "0600"