Skip to main content
A playbook is a saved script of one or more sequential steps. It describes what to accomplish; goals are selected at launch. One scenario can be tested on a test machine, then applied to another group, saving the version and results of each launch. The interface uses the word playbook. In the API, this resource is called recipe; recipe_id and recipe_version in the results refer to the same scenario.

What can I do?

Creating a system user with a typed action is not an interactive SSH access. Use personal login for personal login, temporary access for the contractor.

Creation

Open Playbooks and schedules, run the creation wizard. You can start with a script, a set of actions, or take an existing playbook as a basis. Specify the title that describes the result, and explain the purpose. Add steps in the right order, up to 64 in one scenario. Select an action for each and fill in its parameters. For the script, specify the saved Bash/Ansible file; for configuration, the approved file and the exact path; for systemd, the full unit, for example, nginx.service. Before you save it, check the order and the result. If you have a script in the directory, you don’t start anything on the servers.

Catalog of files, scripts and variables

The same screen stores a directory of scripting materials. The script, the regular file, and the set of variables are different types. The script is executed, the input files are available to it in a temporary directory, the variables are transmitted to the process environment. The materials are stored as separate artifacts with a name, size and checksum. Add the changed content with a new artifact and choose in a new version of the script, so the story doesn’t start to refer to the discreetly changed file. Detailed example of Bash/Ansible with variables and files scriptbook.

Example: Check and run the service

Create a playbook Test Nginx from three steps:
  1. Check service — nginx.service.
  2. Launch service - same unit.
  3. Check service - same unit.
Nginx and the agent must be installed on the node, and the unit must be allowed to start up by local policy. If the service is already active, the start can end without changing. Restart is another operation: it really restarts the service and does not equal “ensure an active state.” The success of the previous step opens the next one on this node. The error should not be masked by the continuation of the script: check the result of the step and the actual state before the new launch.

Launch.

Press it. Launch it., select nodes, groups, or tags. Preview captures the current version, steps, and exact target list. Check machine names, actions, and parameters, then select Perform now. or On schedule.. Prior to launch, the rights, status of the nodes, agents, and support for each action are checked; a changed policy or version may require a new preview; an error in the verification phase does not mean that the action has been performed. Once confirmed, open the task. The list of tasks and history are on the same screen; the card shows each node and each step.

Versions and archive

Button New version It creates the next version of the same script. It saves its steps. It’s tied to the version that modifying or archiving the playbook could stop it from launching again. recipe_changedRecheck the goals and create a schedule for the new version. Archiving removes the script from new launches, preserving the story. It is not a cancellation of an already completed mission.

Verification

Start with a single test node, check the result of each step and the actual status of the service or file, and then select the work targets, and then check the summary again: testing on the test machine does not transfer its rights and dependencies to the entire fleet.

Rollback

Stop the rest of the work through the task card and suspend the schedules. Create a separate reverse scenario or restore the state manually. The playbook version is a determination history, not a snapshot of the file system: there is no automatic total rollback of all steps. Automation capabilities depend on the agent’s version and local policies.