Hi All
I've made a small playbook, that installs pip, and pexpect on our target
servers, as I was thinking I needed to use the expect in the playbook.
So the yaml looks like this:
- name: Installing Desktop Central Agent
expect:
command: "/root/DesktopCentral_LinuxAgent.bin"
responses:
"Do you want to uninstall the existing agent and re-install this
agent? (y/n)" : n
So if it asks (because the playbook is rerun) it should just say "n"
But it fails with this message:
fatal: [servername]: FAILED! => {"changed": true, "cmd":
"/root/DesktopCentral_LinuxAgent.bin", "delta": "0:00:30.117165", "end":
"2019-04-26 12:06:47.724526", "msg": "command exceeded timeout", "rc":
null, "start": "2019-04-26 12:06:17.607361", "stdout": "ServerInfo File
Exists. Proceeding with Installation.\r\nAgent Already Installed.\r\nDo you
want to uninstall the existing agent and re-install this agent? (y/n) : ",
"stdout_lines": ["ServerInfo File Exists. Proceeding with Installation.",
"Agent Already Installed.", "Do you want to uninstall the existing agent
and re-install this agent? (y/n) : "]}
So what did I misunderstand?
Also, I'm unsure if the command will fail on systems not prompting for
anything?
--
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/3ae658da-4093-472e-82c3-a5de21bc6383%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.