When using the following (first time using expect) I have many responses 
with the same prompt.  I took care of the first 20 of them as you can see 
below, however, the same prompt comes up again later during the install.  I 
get complaints about duplicate values and the installer fails.  How can I 
work around this (I wish this particular installer had a response file to 
configure that wasn't garbage)

Error:
 [WARNING]: While constructing a mapping from /etc/ansible/role/agent-
install/tasks/main.yml, line 27, column 7, found a duplicate dict key (PRESS 
<ENTER> TO CONTINUE:). Using last defined value only.


Code:
- name: Execute the installer
  expect:
    command: "{{ directory }}/setup.bin"
    responses:
      'PRESS <ENTER> TO CONTINUE:':
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
        - ""
      # The above command being repeated should be sufficient, but adding a 
couple of more
      # just in case.  Having extras in this case will not hurt
        - ""
        - ""
      'DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? \(Y/N\):': "Y"
      'ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:': ""
      'Manager IP or hostname: :': 1.1.1.1
      'Manager Install Port \(default 12345\) : :': ""
      'Manager Secure Port \(default 23456\) : :': ""
      'PRESS <ENTER> TO CONTINUE:':
        - ""
        - ""
      'PRESS <ENTER> TO EXIT THE INSTALLER:': ""


-- 
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/96cab037-9f2d-4e4d-bc13-577825768ee6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to