diff --git a/skylab/infra/playbooks/bootstrap.yml b/skylab/infra/playbooks/bootstrap.yml index 099b0b0..58d4d37 100644 --- a/skylab/infra/playbooks/bootstrap.yml +++ b/skylab/infra/playbooks/bootstrap.yml @@ -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