Use env lookup to determine HOME for SSH pubkey

Following the merge of
1236d9343e,
facts are no longer gathered in the deploy-dynamic.yaml playbook. The
default value for the ssh_public_key_path variable references a host
fact (ansible_env) which is therefore now invalid.

This change uses the env lookup to determine the HOME environment
variable, since we are actually referring to the home of the user
executing Ansible rather than the remote user.

Change-Id: I3642186e188f8a880246965dbf667ada992cc135
Closes-Bug: #1665681
This commit is contained in:
Mark Goddard 2017-02-17 15:53:52 +00:00
parent 419db33b83
commit 675bb34386
4 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
# The path to the SSH key to be utilized for testing and burn-in
# to configuration drives. When set, it should be set in both baremetal
# and localhost groups, however this is only an override to the default.
# ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
# ssh_public_key_path: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
# Normally this user should be root, however if cirros is used,
# a user may wish to define a specific user for testing VM

View File

@ -17,7 +17,7 @@ mysql_password:
# The path to the SSH key to be utilized for testing and burn-in
# to configuration drives. When set, it should be set in both baremetal
# and localhost groups, however this is only an override to the default.
# ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
# ssh_public_key_path: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
# If testing is true, then the environment is setup for using libvirt
# virtual machines for the hardware instead of real hardware.

View File

@ -17,7 +17,7 @@ mysql_password:
# The path to the SSH key to be utilized for testing and burn-in
# to configuration drives. When set, it should be set in both baremetal
# and localhost groups, however this is only an override to the default.
# ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
# ssh_public_key_path: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
# If testing is true, then the environment is setup for using libvirt
# virtual machines for the hardware instead of real hardware.

View File

@ -6,7 +6,7 @@
write_interfaces_file: false
http_boot_folder: /httpboot
# Default location to the ssh public key for the user operating Bifrost.
ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
ssh_public_key_path: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
# Default interface name
# TODO(TheJulia): Remove this default.