19 lines
454 B
YAML
19 lines
454 B
YAML
- name: Make sure the Backup Host has an SSH key
|
|
user:
|
|
name: "{{ ansible_user }}"
|
|
generate_ssh_key: yes
|
|
|
|
- name: Get the contents of the Backup Host's public key
|
|
slurp:
|
|
src: "{{ ansible_user_dir }}/.ssh/id_rsa.pub"
|
|
register: backup_ssh_key
|
|
|
|
- name: Install rsync on the Backup Host
|
|
yum:
|
|
name: rsync
|
|
state: installed
|
|
|
|
- name: Make sure the backup directory exists
|
|
file:
|
|
path: "{{ backup_directory }}"
|
|
state: directory |