diff --git a/roles/system/files/ssh/stefofficiel.id_rsa.pub b/roles/system/files/ssh/stefofficiel.id_rsa.pub deleted file mode 100644 index 1ad93af..0000000 --- a/roles/system/files/ssh/stefofficiel.id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAaugK6NnC9ZPyl8jRrAurAfaQSAQdBLDV81RNHziaD6 fhc@fhc-MacBookPro diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 25b51b3..31140c2 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -94,17 +94,12 @@ notify: - Restart sshd - - name: Put ssh key home + - name: Put ssh keys ansible.posix.authorized_key: user: root state: present - key: "{{ lookup('file', 'ssh/home.id_ed25519.pub') }}" - - - name: Put ssh key work - ansible.posix.authorized_key: - user: root - state: present - key: "{{ lookup('file', 'ssh/work.id_ed25519.pub') }}" + key: "{{ lookup('file', item) }}" + loop: "{{ query('ansible.builtin.fileglob', 'files/ssh/*.pub') }}" - name: Put cron-apt configuration file ansible.builtin.copy: