On 07.11.2017 23:12, Stephen Tyler wrote:
If I have a playbook with -b --become-user=root --ask-become-pass CLI
arguments.. and a script/task that cannot be started with root (so I
can't
use become on a task level) but later asks to sudo, to be able to pass
the
ask-become-pass to the task?
The script i'm referring to is makepkg -
https://wiki.archlinux.org/index.php/makepkg
I don't think there is a way to get the password from the
ask-become-pass.
It could be considered a potential security issue if that where
possible.
When you have script asking for information that you can't provide with
command line arguments you can use the expect module.
And the password need to be provided somehow, some of the options are
hard code it, use vars_prompt, put it in a variable, use one of the
supported password managers
--
Kai Stian Olstad
--
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/e5f72b548bb61a7ffd45176ed8c47370%40olstad.com.
For more options, visit https://groups.google.com/d/optout.