Update linux/os/create_user_ssh/check_and _add_authorized_key.yml

This commit is contained in:
David Lopez 2023-09-08 06:57:58 +00:00
parent 4160edcebd
commit e6c5a79e5a
1 changed files with 8 additions and 2 deletions

View File

@ -19,5 +19,11 @@
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