Getting to know Ansible playbooks
Now that you have a basic understanding of Red Hat® Ansible® Automation Platform and what goes into it, it’s time to learn about one of its biggest tools available: playbooks. An Ansible Playbook is a blueprint of automation tasks. Basically a means of telling Ansible what to do on which devices, with limited manual effort needed.
What will you learn?
- Overview of Ansible Playbooks
- What language Playbooks are written in
- Tools that can help YAML writing
What do you need before starting?
Ansible Playbooks and how to use them
Playbooks provide instructions for configuring, deploying, and orchestrating IT assets through Ansible Automation Platform. They can be shared and reused by multiple teams to create repeatable automation.
Ansible Automation Platform uses YAML as its programming language because it offers a straightforward, human-readable way to write playbooks and other automation content. Playbooks are written in this programming language to more easily define parameters, variables, and settings.
While writing playbooks in YAML is straightforward and generally does not require any previous experience with it, there are a few tools available to simplify and streamline the creation of Ansible content extending to playbooks:
- Ansible VS Code Extension: This extension adds language support for Ansible to Visual Studio Code and OpenVSX compatible editors running on operating systems that support ansible and ansible-lint. To get a more in-depth look at how this tool works, please read more in the Ansible Visual Studio Code extension learning path.
- Red Hat Ansible Lightspeed with IBM watsonx Code Assistant: An option for Ansible using a generative artificial intelligence (AI) service to help developers create Ansible content more efficiently. More information on this feature is available here.
- Ansible plug-ins for Red Hat Developer Hub: Enjoy curated learning paths, push-button content creation, and integrated development tools designed to help users who are new to Ansible. This collection of resources can assist new learners, as well as experienced teams looking to refine their current automation practices.