Add slave SSH keys
[infra/tools.git] / infra / configure_admin_user_access / playbooks / roles / configure-admin-user-access / tasks / configure-jumphost.yaml
index 625520354cdc9ab564c6a19a66dc44cc6901f342..c21516f7c7593abf513922f7825c0e7574952534 100644 (file)
 - name: Append ssh public key to authorized_keys on target nodes
   lineinfile:
     path: "{{ admin_user_ssh_dir }}/authorized_keys"
-    line: "{{ lookup('file', '{{ nolabs_user_public_key }}') }}"
+    line: "{{ item }}"
     create: true
     state: present
     owner: "{{ admin_user }}"
     group: "{{ admin_user }}"
     mode: 0600
+  with_items:
+    - "{{ lookup('file', '{{ nolabs_user_public_key }}') }}"
+    - "{{ lookup('file', '{{ slave_user_public_key }}') }}"
 
 - name: Create SSH keypair for '{{ admin_user }}'
   openssh_keypair: