I am not sure, but am wondering whether maybe the remote host needs to be able 
to import the required Python library (pexpect) for this to work ... can that 
be it?
 
 

> On 03/09/2023 6:58 PM CET Veera <[email protected]> wrote:
>  
>  
> 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] 
> mailto:[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
>  
> https://groups.google.com/d/msgid/ansible-project/89d10c26-89ba-4d7e-9f3e-c9c4c554a604n%40googlegroups.com?utm_medium=email&utm_source=footer.
> 

-- 
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/669854888.204262.1678385227259%40office.mailbox.org.

Reply via email to