Re: [ansible-project] Having issues with Expect: module

2016-06-16 Thread Matt Martz
The `expect` module has the ability to respond multiple times to a single expected string, so instead of defining the expected string 2 times, you define it once, but give it a list of responses. Such as: - expect: command: /usr/local/sbin/install_blade.sh responses:

Re: [ansible-project] Having issues with Expect: module

2016-06-16 Thread adhithacholan karunamurthy
Hi Matt, Can you please help me here on "duplicate dict key" [kodiak@localhost 10.0.1.51]$ cat dockerimage.yml --- - hosts: KVMGUEST tasks: - expect: command: /usr/local/sbin/install_blade.sh responses: '(?i)Enter choice:': "2"

Re: [ansible-project] Having issues with Expect: module

2016-01-21 Thread Byron Kim
Hi Matt - thanks for the quick response. That seemed to have done the trick. Thanks! On Thursday, January 21, 2016 at 6:23:27 PM UTC-5, Matt Martz wrote: > > Id recommend just starting off with using `Enter: "{{ passphrase}}" > > The (?i) indicates a case insensitive search, and the parents

[ansible-project] Having issues with Expect: module

2016-01-21 Thread Byron Kim
I can't seem to find much documentation or uses of this module. I tried reading up on pexpect documentation however, i'm unable to find my answer. I'm having ansible run a script and then there are prompts that need to be answered. - name: GENERATE CERTIFICATE AND KEY expect: command:

Re: [ansible-project] Having issues with Expect: module

2016-01-21 Thread Matt Martz
Id recommend just starting off with using `Enter: "{{ passphrase}}" The (?i) indicates a case insensitive search, and the parents around ^ are unnecessary, and the can be problematic as sometimes expect sees a \n or a space as the first char. On Thursday, January 21, 2016, Byron Kim