15 lines
415 B
YAML
15 lines
415 B
YAML
- name: Install key and disable root passowrd
|
|
hosts: all
|
|
become: yes
|
|
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
|