Skip to content

Playbook

Ansible playbooks

"Ansible Playbooks are lists of tasks that automatically execute for your specified inventory or groups of hosts. One or more Ansible tasks can be combined to make a play—an ordered grouping of tasks mapped to specific hosts—and tasks are executed in the order in which they are written." Reference

Default playbooks

SSM is shipped with several default playbooks to operate basics tasks such as installing the agent, updating the OS, rebooting, etc...

yaml
- hosts: all
  tasks:
  - name: Unconditionally reboot the machine with all defaults
    ansible.builtin.reboot:

Example of playbook for rebooting a device

Default playbooks are starting with '_' chars and cannot be deleted. You can find the list of default playbooks here

Editing and creating playbooks

You can edit the default playbooks as well as creating your own custom ones with the editor

Go to the "Playbooks" section on the left menu, and click on a existing playbook or create a custom one

playbooks1

⚠️ Playbooks are not saved automatically!

To prevent any unwanted modifications on playbooks content, playbooks are not saved automatically. You must click on the save button (bottom right floating menu)

Configuration of playbooks: ExtraVar

You can add and share ExtraVars across playbooks. When a playbook is opened, click on the configuration tab above it, then click on the (+) icon on the top right side. playbooks2

Enter a new name or select the name of an existing Extra var. Your custom var value is saved globally and can be re-used in others playbooks playbooks3

To understand more about variables, see the official Ansible documentation

Made with love