While sourcing a  profile file , I have to enter a password  in my play.

*my_pwd: hiddenpass*

*- name:  source the environment variable file *
*  shell: " source ./myenv*"
 
while executing  i am prompted with a password 
so I am using the expect module to pass the password
  
*name: Case insensitive password string match*





*      ansible.builtin.expect:        command: source    ./myenv        
responses:          (?i)password: "{{  my_pwd  }}"        # you don't want 
to show passwords in your logs      no_log: true*

it fails with below error:



*fatal: [127.0.0.1]: FAILED! => {    "censored": "the output has been 
hidden due to the fact that 'no_log: true' was specified for this result",  
  "changed": false}*

if i set no_log: false ,  then  i receive the below error
*"msg": "Failed to import the required Python library (pexpect)*


Is there any other way/module  to read  the password from the variable ?


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/89d10c26-89ba-4d7e-9f3e-c9c4c554a604n%40googlegroups.com.

Reply via email to