On 08.02.17 05:10 [email protected] wrote:
> - hosts: localhost
>   tasks:
>   - command: whoami
>     register: who_is_user1
>     become: true
>     become_user: user1

I think you could set a become_password at this point.
become_password: foobar

Instead of using cleartext it might be better to have this in the
host_vars (maybe encrypted with ansible-vault) and just use the
variable here:

In the file host_vars/host_foo/some.yml:
become_password_for_user_xyz: secret

And then use "become_password: {{ become_password_for_user_xyz }}" in
your playbook.

Untested.

Johannes


-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6a2f40e9-2c4f-0ba2-7fce-5f02b1673016%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to