This guide will show you how to view and run Ansible Playbooks against systems in your Cyber Range environments.
Ansible is an open-source tool for software provisioning, configuration management, and application deployment. It's agentless, connecting remotely via SSH to carry out tasks. Ansible Playbooks are the building blocks for those tasks — they're written in YAML format and offer a repeatable, reusable way to manage and deploy systems. Each playbook consists of one or more plays, which define the work to be done on a managed host system.
Using Ansible Playbooks within Cyber Ranges
Within Cyber Ranges, you can't upload your own Ansible Playbooks. Instead, there's a pre-defined selection of playbooks to choose from. These playbooks automate a variety of common tasks, including installing software, configuring settings, and starting services.
There are a few things to be aware of before running a playbook:
- Ansible Playbooks can only be run against Linux-based systems.
- Only one playbook can be running at any given time.
- Both the AdminBox and the system you want to run the playbook against must be in the Running state.
- Playbooks that are stuck or running for an extended period will be interrupted and cancelled automatically.
Viewing an Ansible Playbook
To view the contents of a playbook, navigate to the Edit System view and go to the Ansible Playbooks tab. Click the playbook's name and the contents will be displayed in YAML format.
Running an Ansible Playbook
You don't need to use the command line to run an Ansible Playbook within a Cyber Range. You can do it directly from the Edit System view.
- Navigate to the Edit System view of the target host within the Cyber Range.
- Go to the Ansible Playbooks tab.
- Select the playbook you want to run and follow the prompts to execute it.
The playbook will then run against the target host, automating the tasks defined within it.
Viewing Ansible Playbook run history
To view a log of playbooks that have run against a particular system, go to the Edit System view and open the Ansible Playbooks tab. From there, you can see how long each playbook took to run and its status.