Add setup auth playbook

This commit is contained in:
William Young 2023-02-17 07:02:54 -06:00
parent 5c6b83b7d1
commit 7d4fe344af
1 changed files with 12 additions and 0 deletions

12
setup_auth.yaml Normal file
View File

@ -0,0 +1,12 @@
- hosts: all
tasks:
- name: Add public key to authorized_keys
authorized_key:
user: root
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIArcvGwvT6CbzyY513rhD6zTPXxOvHEsekE5ElGc3PWv ansible@ansible.william.zone
state: present
become: true
- name: Remove root password
shell: passwd -d root
become: true