Inputs & Outputs
Command
- Contains command information for the run_commands action
Example
1 2 3 4 5 |
|
Required Keys
command: The command to run
Optional Keys
success: A regular expression matching the prompt when the command succeeds (defaults to the base_prompt)
questions: A list of CommandQuestion dictionaries (defaults to null)
CommandQuestion
-
Contains prompts and responses for questions asked by a command
-
You can supply as many of these questions & answers as you need to
-
Each question prompt must be unique per-command
-
Question prompts that aren't found are ignored
Question Handling
The following process is started if question prompt is found.
- The answer to the prompted question is sent
- If the response is in
base_prompt
or success, processing is complete - Or if it's in another question prompt, go back to step 1
If a response isn't found in step 2 or 3 it will be treated as a failure.
Example
1 2 3 4 5 6 7 8 9 |
|
Required Keys
prompt: A regular expression matching the question prompt
answer: The command to run if the question is asked
SSHKeyAuth
-
Contains SSH connection details for key authentication
-
It is used as an input to many of the actions in this plugin
-
The example below shows the dictionary structure in YAML
Example
1 2 3 4 5 6 7 |
|
SSH Prompts
As of plugin version 1.1.0, if a base_prompt expression is not supplied, PPA will use the following:
^[a-zA-Z0-9\_\-]+@[a-zA-Z0-9\_\-]+:~\$\s+$
This expression supports the default Ubuntu SSH prompt in this format:
ubuntu@ip-172-30-23-5:~$
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Required Keys
address: The target IP or DNS address.
username: Username for authentication.
private_key: RSA private key for authentication.
passphrase: The passphrase for the supplied private_key or null if not required.
Optional Keys
port: The target SSH port (defaults to 22)
base_prompt: Regular expression to match the SSH prompt (defaults to the standard Ubuntu SSH prompt format)
SSHPasswordAuth
-
Contains SSH connection details for password authentication
-
It is used as an input to many of the actions in this plugin
-
The example below shows the dictionary structure in YAML
Example
1 2 3 4 5 6 |
|
SSH Prompts
As of plugin version 1.1.0, if a base_prompt expression is not supplied, PPA will use the following:
^[a-zA-Z0-9\_\-]+@[a-zA-Z0-9\_\-]+:~\$\s+$
This expression supports the default Ubuntu SSH prompt in this format:
ubuntu@ip-172-30-23-5:~$
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Required Keys
address: The target IP or DNS address.
username: Username for authentication.
password: Password for authentication.
Optional Keys
port: The target SSH port (defaults to 22)
base_prompt: Regular expression to match the SSH prompt (defaults to the standard Ubuntu SSH prompt format)
User
- Contains Ubuntu user account information
Example
1 2 3 4 5 6 |
|
User Keys
username: username
uid: user ID
gid: primary group ID
description: the contents of the GECOS field
home_directory: path to the user's home directory
login_shell: path to the user's login shell