Using ansible to hardenize and configure servers raspberry-pi (arm64), everything works ok, but I need to manually login, change password and the push an ssh key to make my playbook work.
current process.
- Fresh installed Ubuntu 20.04
- First login user and password ubuntu
- SO force to change password, so I need to fill 3.1 current password 3.2 new password 3.3 password confirmation
- ssh-copy-id -i my sshkey ubuntu@server
- run my playbook to hardenize and do the rest of the job.
¿Is there any way to perform steps 1 to 4 through ansible instead of only manually?
I was thinking to get this done with expect but as per my understanding it only will work after ansible has been authenticated.