Skip to content

Commit

Permalink
Resolve "pglift : correction échange de clé SSH"
Browse files Browse the repository at this point in the history
  • Loading branch information
arnobnq committed Jan 31, 2024
1 parent b55dfd0 commit a92fc5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fr/pglift/ansible/playbooks/roles/ssh-exchange/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
- name: Fetch the public key files
fetch:
src: "~{{ username }}/.ssh/id_rsa.pub"
dest: "/tmp/{{ansible_hostname}}-id_rsa.pub"
dest: "/tmp/{{inventory_hostname}}-id_rsa.pub"
flat: yes
- name: Add the keys to authorized_keys
ansible.posix.authorized_key:
user: "{{ username }}"
key: "{{ lookup('file','/tmp/{{item}}-id_rsa.pub')}}"
when: "item != ansible_hostname"
when: "item != inventory_hostname"
with_items:
- "{{ groups[target_group] }}"

0 comments on commit a92fc5a

Please sign in to comment.