Tutorial - Creating the Playbook
Stage 3 - Automated Actions
Description
On the previous page we defined the steps our task will perform.
It's time to add a list of actions to each of those steps.
Step 1 - Display Welcome Text
Purpose
The first step of our task will:
- Show the Task Operator some welcome information
- Wait for them to click Start
Plugin Actions
- ppa.ui.output_markdown
- ppa.ui.input_accept
Examples
Playbook Snippet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
PPA Screenshot
Step 2 - Get Domain Controller
Our task needs some Domain Controller details so it can connect to Active Directory.
Purpose
This step will:
-
Get the details from a Hashicorp Vault secret called active_directory
-
Save the details as the
domain_controller
variable
See the examples for a screenshot of the Hashicorp configuration
Plugin Actions
- hashicorp_vault.key_value.read_secret
Examples
Playbook Snippet
1 2 3 4 5 6 7 |
|
PPA Screenshot
Hashicorp Vault Secret
Step 3 - Search for User
Now the task needs an Active Directory user account.
Purpose
This step will:
-
Allow the Task Operator to search for & select a user account
-
Save the selection as the
user
variable
The connection details are supplied by loading the domain_controller
variable from step 2.
Plugin Actions
- active_directory.users.get_interactive
Examples
Playbook Snippet
1 2 3 4 5 6 |
|
PPA Screenshots
Step 4 - Add User to Groups
The final step will add the user account to one or more Active Directory groups.
Purpose
This step will:
-
Allow the Task Operator to search for & select one or more groups
-
Add the user account to the selected groups
The connection details are supplied by loading the domain_controller
variable from step 2.
The user is supplied by loading the user
variable from step 3.
Plugin Actions
- active_directory.users.add_to_groups_interactive
Examples
Playbook Snippet
1 2 3 4 5 6 |
|
PPA Screenshots
Updated Playbook
The Playbook is complete!