Update linux/os/create_user_ssh/awx_add_authorized_key.yml

This commit is contained in:
David Lopez 2023-09-07 09:31:05 +00:00
parent 982a6ebf1a
commit 6f34764da8
1 changed files with 7 additions and 1 deletions

View File

@ -7,11 +7,17 @@
tasks:
- name: Add ssh pub keys AWX
authorized_key:
ansible.posix.authorized_key:
user: root
key: "{{ key_to_add }}"
state: present
manage_dir: yes
- name: Another way to call known_hosts
ansible.builtin.known_hosts:
name: awx.verdnatura.es # or 10.9.8.77
key: awx.verdnatura.es ssh-rsa awx.verdnatura.es # some key gibberish
path: /root/.ssh/known_hosts
state: presen