Merge "Update Octavia keypair when public key changed"
This commit is contained in:
commit
c2a6024c46
|
@ -65,10 +65,18 @@
|
||||||
when:
|
when:
|
||||||
- amp_ssh_key_path is not defined or ((amp_ssh_key_path | length) < 1)
|
- amp_ssh_key_path is not defined or ((amp_ssh_key_path | length) < 1)
|
||||||
|
|
||||||
- name: upload pub key to overcloud
|
- name: get the desired public key fingerprint
|
||||||
shell: |-
|
shell: |
|
||||||
openstack keypair show {{ amp_ssh_key_name }} || \
|
set -o pipefail
|
||||||
openstack keypair create --public-key {{ amp_ssh_key_path_final }} {{ amp_ssh_key_name }}
|
ssh-keygen -E md5 -lf {{ amp_ssh_key_path_final }} | awk '{ print $2 }' | cut -c 5-
|
||||||
|
register: ssh_keygen_results
|
||||||
|
|
||||||
|
- name: Create keypair
|
||||||
|
os_keypair:
|
||||||
|
state: present
|
||||||
|
name: "{{ amp_ssh_key_name }}"
|
||||||
|
public_key_file: "{{ amp_ssh_key_path_final }}"
|
||||||
|
register: keypair_fingerprint
|
||||||
environment:
|
environment:
|
||||||
OS_USERNAME: "{{ auth_username }}"
|
OS_USERNAME: "{{ auth_username }}"
|
||||||
OS_PASSWORD: "{{ auth_password }}"
|
OS_PASSWORD: "{{ auth_password }}"
|
||||||
|
|
Loading…
Reference in New Issue