using ansibe 1.4.3 on linux intel
existing playbooks are available
a new request for modification came in
execute some shell command : export xx=yy;export cc=yy;cd /hhhh; ./dsmapiw
this command will prompt for the password 3 times
pw has been entered with vars_prompt
I could not find an easy way to reply to these prompts
I have seen -expect but we migth not have this module
any pointer to doc/page is welcome
thanks for all update
best regards, Guy Przytula
Hey Guy,
First, I highly recommend you upgrade to a newer version of Ansible. Right now 1.9.3 is new, and it won’t be long until version 2.0 is released. See release notes here: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md
Now, about your question: which password is anisble prompting for? It sounds like it’s the sudo password, in which case you can use the flag --ask-sudo-pass on the playbook run and type it only once. Don’t use vars_prompt for a sudo password, since ansible already has functionality to handle it. There’s also --ask-pass for the SSH password, in case that’s what’s missing.
Last, you can run the ./dsmapiw command with custom environment variables by using the ‘environment’ keyword. See the examples here: http://docs.ansible.com/ansible/playbooks_environment.html
thanks for the update
yes, we should plan to install a newer version
the utility prompting for the pw is not for sudo or anything related to operating system
it is a utility to generate a password for db2 to be used whenever accessing tsm (storage manager)
the utility prompts for current password - new password and confirm new password
we just do this the first time to generate the pwfile keeping this encrypted pw… and never be prompted again
best regards, Guy Przytula