--- - name: Pre-flight validation ansible.builtin.include_tasks: validate.yml - name: Manage SSH host keys ansible.builtin.include_tasks: keys.yml - name: Configure sshd ansible.builtin.include_tasks: config.yml # In case the user was bootstrapped to root - name: Ensure ansible_user is used for SSH # Connection var on purpose: restores the SSH user when the connection was bootstrapped as root. ansible.builtin.set_fact: # noqa: var-naming[no-role-prefix] ansible_ssh_user: "{{ ansible_user }}" - name: Flush handlers early ansible.builtin.meta: flush_handlers