Reference - Steps

The steps list is required in the root of the Playbook.

Summary

  • Steps contains a list of the high-level operations your task performs.

  • You can define as many steps as you need.

  • Each individual step in the list is a dictionary.

Required Keys

name

A name used to identify the step & describe what it does.

actions

A list of actions for the step to perform.

Optional Keys

when

Perform the step if a condition is met.

for_each

Perform the step for each item in a list.

Offers more functionality than the legacy sequence key.

New in PPA version 2.10.0!

while

Perform the step until a condition is met.

Offers more functionality than the legacy until key.

New in PPA version 2.10.0!

sequence (legacy)

Perform the step for each item in a list.

This is deprecated in PPA version 2.10.0 in favour of for_each!

until (legacy)

Perform the step until a condition is met.

This was deprecated in PPA version 2.10.0 in favour of while!

Example

This snippet shows two named steps.

Each step performs a single action.

steps:

  - name: Find Active Directory Groups
    actions:

      - active_directory.groups.search:
          sAMAccountName: Operations*
        load:
          connection_info: active_directory_details
        save: operations_groups 


  - name: Select Groups to Audit

    actions:
      - active_directory.groups.input_table:
          text: Please Select 1 or more Groups
        load:
          group_list: operations_groups
        save: selected_groups