Force ansible to ask for username and password when running task on a server

My ansible server and playbook are running on a closed environment – So basically everything is been accessed by know ssh-keys and I don’t need to supply any user and password while running the playbooks.

I need to create a new playbook that the first task requires to connect to a server that is not part of my environment (customer environment) – Since I cannot take the SSH key of the server, I need to force the task to ask for the username , password , and the root password (become = ture) this in order to connect the server – How can this be done as part of a task or playbook ?

Thanks

Good morking.

Look for ‘-K’ and ‘-k’ flag.

Cheers.

Javier