I'm guessing this isn't possible, but I might have been looking at it too
long at this point to know if I'm missing something...
I have a playbook with a role in which one task has a remote_user and a
delegate_to option set. That task has to run for each host on the
delegate_to server which has a different ssh_user and password. Using
ssh-keys or the same password as the ansible_ssh_user, it works okay,
however, without ssh keys or the same password, it will fail.
For some people that will be executing this play, they will not be able to
use ssh_keys and their passwords are different from the inventory and the
delegate_to host. I could prompt for the remote_user and password on play
run, however, I have not figured out how to set the password for the single
Here is an example. Is there a way to specify the password for jdoe?
(note syntax and spacing may be off as I just typed this out)
- name: Sample play
msg: "End of play"
In the role/myRole/tasks/main.yml
- include: myfacts.yml
- name: Some task
command: test 0
- name: Problem task
command: "shell command"
- name: Some other task
command: "test -f file.txt"
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.