1
          commands:
            - expect:
                command: "vsx update-software ....."
                responses:
                  'The.....(y/n)?': 'y'
                  'Do.....(y/n)?': 'y'

I'm trying to run this on a Playbook, I'm getting this error:

"msg": "invalid keys: expect"
Doc
  • 133
  • 1
  • 1
  • 10
  • 1
    You appear to have conflated two differently named "command" concepts: the [`aruba_command:`](https://docs.ansible.com/ansible/2.9/modules/aruba_command_module.html#examples) only sends **aruba** commands to the device, it does not run a copy of `expect` against the connection; the [`expect:`](https://docs.ansible.com/ansible/2.9/modules/expect_module.html) module runs **shell** commands – mdaniel Mar 20 '20 at 18:05
  • 1
    I'm using the **expect** directive to confirm the execution of the command as it requires a "y" confirmation. Is there an alternative way to confirm the execution of the command or to bypass it ? – Doc Mar 20 '20 at 19:15
  • 2
    the [`auto-confirm`](https://techhub.hpe.com/eginfolib/Aruba/OS-CX_10.02/5200-5314/index.html#GUID-2AF0CBC8-A479-4E25-8218-00E0900B2E51.html) option appears to be what you'd want – mdaniel Mar 20 '20 at 19:22
  • Thanks a lot! That was what I'm looking for, appreciate it. – Doc Mar 21 '20 at 19:22

0 Answers0