I'm trying to use expect Ansible module to perform an interactive task in a 
virtual machine. The module works, but the task is very long and I have 
problems with the timeout. I get an error like this. I tried to use async 
but it fails and returns this error:

[0;32m    qemu: fatal: [deploy]: FAILED! => {"changed": false, "failed": 
true, "invocation": {"module_args": {"async": 600, "command": 
"config_exec", "poll": 300, "responses": {"(?i)continue": "y", 
"(?i)password": "pass"}}, "module_name": "expect"}, "msg": "unsupported 
parameter for module: async"}

This is the part of my playbook with problems:

# Configure system for user
- hosts: deploy
  tasks:
  - shell: whoami
    register: result
  - debug: var=result
  - name: configuration
    expect:
     command: config_exec
     responses:
      (?i)password: "{{pass}}"
      (?i)continue: "y"
     async: 600
     poll: 300

Is there any way to make expect and async to work together?
 

-- 
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/37a1e2a2-279a-4e6d-8b2c-4d0e1bae0a19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to