diff --git a/linux/os/create_user_ssh/check_and _add_authorized_key.yml b/linux/os/create_user_ssh/check_and _add_authorized_key.yml index 4bd0744..aa37b41 100644 --- a/linux/os/create_user_ssh/check_and _add_authorized_key.yml +++ b/linux/os/create_user_ssh/check_and _add_authorized_key.yml @@ -18,6 +18,12 @@ - name: Display result debug: msg: "Authorized key exists: {{ authorized_key_exists }}" - - + + - name: Add ssh pub keys AWX + authorized_key: + user: root + key: "{{ key_to_add }}" + when: not authorized_key_exists | False + state: present + manage_dir: yes