15 lines
626 B
YAML
15 lines
626 B
YAML
---
|
|
- name: Allow SSH access from Backup Host to OpenStack nodes
|
|
authorized_key:
|
|
user: "{{ ansible_user }}"
|
|
state: present
|
|
key: "{{ hostvars[groups[backup_server_hostgroup][0]]['backup_ssh_key']['content'] | b64decode }}"
|
|
|
|
# The synchronize module has issues with delegation and remote users. This
|
|
# task creates SSH config to set the SSH user for each host.
|
|
- name: Add temporary SSH config for each OpenStack node on Backup Host
|
|
template:
|
|
src: backup_ssh_config.j2
|
|
dest: /var/tmp/{{ ansible_hostname }}_config
|
|
delegate_to: "{{ hostvars[groups[backup_server_hostgroup][0]]['inventory_hostname'] }}"
|