New in version 2.0.
expectmodule executes a command and responds to prompts.
$HOMEand operations like
"&"will not work.
Change into this directory before running the command.
The command module takes command to run.
A filename, when it already exists, this step will not be run.
Whether or not to echo out your response strings.
A filename, when it does not exist, this step will not be run.
Mapping of expected string/regex and string to respond with. If the response is a list, successive matches return successive responses. List functionality is new in 2.1.
Amount of time in seconds to wait for the expected strings.
- name: Case insensitve password string match expect: command: passwd username responses: (?i)password: "MySekretPa$$word" - name: Generic question with multiple different responses expect: command: /path/to/custom/command responses: Question: - response1 - response2 - response3
|, etc), you must specify a shell in the command such as
/bin/bash -c "/path/to/something | grep else".