Custom Playbook

Custom playbook enables you to customize or create your own playbook based on requirements.

Creating Custom Playbook

To create a custom playbook, perform the following:

  1. Use the following command to establish connection to Pulse host:
Bash
Copy
  1. Use the following command to access the directory:
Bash
Copy
  1. Add a file playbook.json in above created directory. Refer the following example of JSON structure:
JSON
Copy

The following table provides description of the parameters:

ParameterDescription
FilenameName of the ansible playbook file. Path relative to src folder.
VersionVersion of the playbook. Note Currently unused.
IDA unique playbook identifier.
NameName of the playbook. The name that is displayed Actions page in the UI.
CategoryCategory of the playbook.
DescriptionDescribes the function of the playbook.
VariablesList of variables included in the ansible playbook. Variables required by the user to input from the Actions page in the UI.

The following table provides description of the variable structure:

ParametersDescription
NameName of the variable. Note The name should match with the variable identifier in the playbook.
Data typestring or number or boolean
DescriptionDescription of the variable used in UI.
  1. Add a file playbook.yml in above created directory. Perform the following steps to authenticate Kerberos:

Pulse v2.1.0 introduces a task Kerberos Auth which is required when creating a new playbook. If Kerberos is enabled the user must supply the is_kerberized flag as true, as well as the Kerberos Principle and the Keytab file path.

4.1. Copy the keytab file from the source to the destination.

Use the following task to copy the keytab file from source to the destination location.

YAML
Copy

Note: The file is copied as read-only and the owner is defined as root.

4.2 Authenticate Kerberos running the kinit command.

The task uses the kerberos_principal and kerberos_keytab files to do the authentication. Run the following task and ensure to add is_kerberized as true to authenticate.

YAML
Copy

4.3 Add the task that you want to run. The following YAML task is an example.

YAML
Copy

4.4 Remove the keytab file from the /tmp location.

Run the following task to remove the copied file from the destination.

YAML
Copy

Command to Run the Playbook

YAML
Copy

Deploying Custom Playbook

To deploy the playbook you created to the Pulse UI, Perform the following:

  1. Structure of playbook directory:
Bash
Copy
  1. Run the following command to restart the ad-director container.
Bash
Copy
  1. Go to Pulse UI and click on the option Create Action to view the newly added playbook.
  1. Does not support password-based authentication to execute playbooks
  2. Option to export and import created playbooks.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard