Your `responses` argument needs to be a hash/dict, not an array/list:

- expect:
    echo: yes
    command: /use/bin/mybinary argument
    responses:
      'Username': "{{ UserName }}"
      'Password': "{{ UserPWD }}"

The only change above is removing the `- ` from before each question/answer.

On Wed, May 25, 2016 at 3:12 PM, Jeff Rogers <[email protected]> wrote:

> I'm getting the following error:
>
> ...... "msg": "argument responses is of type <type 'list'> and we were
> unable to convert to dict"
>
> I'm trying to do this.
>
> - name: Name of the thing I'm doing
>   hosts: '{{ target }}'
>   serial: 1
>   vars_prompt:
>     - name: "UserName"
>       prompt: "User Name "
>       private: yes
>
>     - name: "UserPWD"
>       prompt: "Password "
>       private: yes
>
> - expect:
>     echo: yes
>     command: /use/bin/mybinary argument
>     responses:
>       - 'Username': "{{ UserName }}"
>       - 'Password': "{{ UserPWD }}"
>
> --
> 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/8b2d6609-1a9d-45ec-ab2e-ffbcb36cb8f9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v-YOQsLJ0srk4ofKZXs9F10Bj7rfQT45Pv%2BC2rZ00GzMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to