Hello,


I use Ansible 2.2.1.0

I try to use ansible expect module with a command:
    expect:
        command: set password of database
        responses:
            Admin Password for db_name: 'admin'
            Admin Password Confirmation: 'admin'

I receive this error:

fatal: [subdomain.xxxx.com]: FAILED! => {"changed": false, "failed": true, 
"module_stderr": "Connection to sante.c3-bs.com closed.\r\n", "module_stdout": 
"Traceback (most recent call last):\r\n  File 
\"/tmp/ansible_ys2qrkdy/ansible_module_expect.py\", line 237, in <module>\r\n   
 main()\r\n  File \"/tmp/ansible_ys2qrkdy/ansible_module_expect.py\", line 149, 
in main\r\n    response = u'%s\\n' % 
value.rstrip('\\n').decode()\r\nAttributeError: 'str' object has no attribute 
'decode'\r\n", "msg": "MODULE FAILURE"}


I don't understand this error can someone help me and give me the right 
responses or right syntaxe for expect command?


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3c64f344-e74c-41f5-b39f-8fe20f579758%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to