skylab
/
skylab-ansible
Archived
2
0
Fork 0

Fix updating ssh keys before user exists

This commit is contained in:
Ethan Paul 2023-04-10 17:53:14 -04:00
parent fa0df823ee
commit 538bb26f83
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867
1 changed files with 6 additions and 6 deletions

View File

@ -81,12 +81,6 @@
state: present
gid: 1400
- name: Update ansible user authorized keys
ansible.posix.authorized_key:
user: ansible
exclusive: true
key: "{{ skylab_mgmt_keys | join('\n') }}"
- name: Generate ansible user account password
delegate_to: localhost
no_log: true
@ -110,6 +104,12 @@
uid: 1400
password: "{{ _password_ansible.stdout }}"
- name: Update ansible user authorized keys
ansible.posix.authorized_key:
user: ansible
exclusive: true
key: "{{ skylab_mgmt_keys | join('\n') }}"
- name: Remove ansible user group
ansible.builtin.group:
name: ansible