add ssh_updateKey

This commit is contained in:
eneller committed 2023-02-05 21:33:47 +01:00
1 parent 70e4cb6b2f
commit 7b972c9f81
1 file changed
+13
+13
View File
@@ -0,0 +1,13 @@
---
# https://docs.ansible.com/ansible/latest/collections/ansible/posix/authorized_key_module.html#examples
- name: update apt-cache and upgrade
hosts: oracleServer
tasks:
- name: upgrade packages
become: true
ansible.posix.authorized_key:
user: "{{ ansible_user_id }}"
exclusive: true
state: present
key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}"