On 01.03.2019 22:56, John Harmon wrote: > > > On Friday, March 1, 2019 at 2:55:13 PM UTC-7, Kai Stian Olstad wrote: >> >> On 01.03.2019 22:47, John Harmon wrote: >>> 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. >> >> As the error say, you can only have one "PRESS <ENTER> TO CONTINUE:" so >> all the reposes must be merged into one. >> responses is a dictionary, and dict can only have unique keys. >> >> >> -- >> Kai Stian Olstad >> > > So, is this even possible in this situation where the same key comes up > later?
Yes, you just add all the responses under the same key. Responses don't need to be in the order they occurs, when expect sees the string(key) it takes the next element in the list(value) of that key. -- Kai Stian Olstad -- 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/80afb8a0-b1e1-4671-b23d-e1f0ee541a02%40olstad.com. For more options, visit https://groups.google.com/d/optout.
