Skip to content

Commit 2e6e346

Browse files
committed
Support extra authorised SSH keys on the Ansible control host
1 parent f985f7e commit 2e6e346

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ansible/deploy-openstack-config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@
225225
dest: "{{ ansible_env.HOME }}/.ssh/id_rsa"
226226
mode: "0600"
227227

228+
- name: Ensure additional public keys are authorised
229+
ansible.posix.authorized_key:
230+
user: "{{ ansible_user }}"
231+
key: "{{ item }}"
232+
loop: "{{ extra_ssh_public_keys }}"
233+
228234
- name: Ensure OpenStack Config repository is present
229235
ansible.builtin.git:
230236
repo: "{{ openstack_config_repo }}"

ansible/vars/defaults.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ vault_password_path: "~/vault.password"
2929

3030
ssh_key_path:
3131

32+
# A list of additional SSH public keys to authorise on the Ansible control host.
33+
extra_ssh_public_keys: []
34+
3235
ansible_ssh_private_key_file: "{{ ssh_key_path }}"
3336

3437
vxlan_vni:

0 commit comments

Comments
 (0)