Update linux/os/create_user_ssh/check_and _add_authorized_key.yml

This commit is contained in:
David Lopez 2023-09-08 06:13:31 +00:00
parent 53f43647e3
commit 790ee2bd8c
1 changed files with 2 additions and 7 deletions

View File

@ -18,15 +18,10 @@
debug: debug:
msg: "Authorized key exists: {{ authorized_key_exists }}" msg: "Authorized key exists: {{ authorized_key_exists }}"
- name: Create user with hash
user:
name: awx
state: present
shell: /bin/bash
- name: Add ssh pub keys AWX - name: Add ssh pub keys AWX
authorized_key: authorized_key:
user: awx user: root
key: "{{ key_to_add }}" key: "{{ key_to_add }}"
state: present state: present
manage_dir: yes manage_dir: yes
when: "'authorized_key_exists' True" when: "'authorized_key_exists' False"