Merge "Avoid conflicting delegation with authorized_keys"

This commit is contained in:
Zuul 2018-03-14 17:05:40 +00:00 committed by Gerrit Code Review
commit 8c1e9d9e9c
2 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,6 @@
authorized_key:
user: "{{ keystone_system_user_name }}"
key: "{{ keystone_pubkey | b64decode }}"
when: keystone_pubkey is defined
when: inventory_hostname == ansible_play_batch[0]
delegate_to: "{{ item }}"
with_items: "{{ ansible_play_hosts }}"

View File

@ -21,4 +21,5 @@
- name: Register a fact for the keystone pub key
set_fact:
keystone_pubkey: "{{ keystone_pub.content }}"
keystone_pubkey: "{{ ansible_play_batch | map('extract', hostvars, 'keystone_pub') | map(attribute='content') | map('b64decode') | join('\n') | b64encode }}"
when: inventory_hostname == ansible_play_batch[0]