From 7b972c9f81aba089c8a0768c88fa27ee0c593076 Mon Sep 17 00:00:00 2001 From: eneller Date: Sun, 5 Feb 2023 21:33:47 +0100 Subject: [PATCH] add ssh_updateKey --- ssh_updateKey.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ssh_updateKey.yml diff --git a/ssh_updateKey.yml b/ssh_updateKey.yml new file mode 100644 index 0000000..93c79a8 --- /dev/null +++ b/ssh_updateKey.yml @@ -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') }}" +