Playbooks β
π° In a Nutshell β
Sum-up
- Create Directory/Playbook: Right-click parent directory title in the playbooks directory tree view.
- Edit Playbooks: Click on a playbook file to open the editor.
- Save Changes: Manually click the save button; no auto-save.
- Sync Remote Repos: Right-click root node for additional commit and sync options.
- Playbooks Architecture: Local (folder icon) and remote (git icon) repositories.
- Default Playbooks: Stored in
ssm-core
andssm-tools
._
prefixed playbooks inssm-core
cannot be deleted.
β
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
Creating a directory or an empty playbook β
- Directory: On the playbooks directory tree view, right-click on the title of the parent directory, and on the dropdown menu, click
Create a directory
- Empty Playbook: On the playbooks directory tree view, right-click on the title of the parent directory, and on the dropdown menu, click
Create a playbook
Using your own repositories
While it is currently possible, we strongly advise creating your own repository for your custom playbooks instead of using ssm-core
or ssm-tools
. These custom repositories will be erased after each update of SSM.
Editing playbooks β
You can edit both the default playbooks as well as your own custom ones with the editor.
Just click on a playbook file and the editor will open.
β οΈ Playbooks are not saved automatically!
To prevent any unwanted modifications to a playbook's content, playbooks are not saved automatically. You must click on the save button (bottom right floating menu)
Syncing playbooks (only for remote repositories) β
When working with a remote repository, a right-click on the root node will offer you additional options, such as Commit & Syncing your changes, or force pulling from the repository
Playbooks Architecture β
The Playbooks page displays a list of Playbooks Repositories
, that can be expanded to view a directory tree.
There are two types of Playbooks Repository
: Local and Remote repositories, symbolized respectively by the icons:
Default playbooks β
SSM is shipped with several default playbooks to perform basic tasks such as installing the agent, updating the OS, rebooting, etc. These playbooks are stored in two default repositories: ssm-core
and ssm-tools
- hosts: all
tasks:
- name: Unconditionally reboot the machine with all defaults
ansible.builtin.reboot:
Example of playbook for rebooting a device
ssm-core
playbooks start with '_' characters and cannot be deleted.