Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 1. Ansible development tools
Ansible development tools (ansible-dev-tools
) is a suite of tools provided with Ansible Automation Platform to help automation creators to create, test, and deploy playbook projects, execution environments, and collections.
The Ansible VS Code extension by Red Hat integrates most of the Ansible development tools: you can use these tools from the VS Code user interface.
Use Ansible development tools during local development of playbooks, local testing, and in a CI pipeline (linting and testing).
This document describes how to use Ansible development tools to create a playbook project that contains playbooks and roles that you can reuse within the project. It also describes how to test the playbooks and deploy the project on your Ansible Automation Platform instance so that you can use the playbooks in automation jobs.
1.1. Ansible development tools components
You can operate some Ansible development tools from the VS Code UI when you have installed the Ansible extension, and the remainder from the command line. VS Code is a free open-source code editor available on Linux, Mac, and Windows.
- Ansible VS Code extension
This is not packaged with the Ansible Automation Platform RPM package, but it is an integral part of the automation creation workflow. From the VS Code UI, you can use the Ansible development tools for the following tasks:
- Scaffold directories for a playbook project or a collection.
- Write playbooks with the help of syntax highlighting and auto-completion.
- Debug your playbooks with a linter.
-
Execute playbooks with Ansible Core using
ansible-playbook
. -
Execute playbooks in an execution environment with
ansible-navigator
.
From the VS Code extension, you can also connect to Red Hat Ansible Lightspeed with IBM watsonx Code Assistant.
- Command-line Ansible development tools
You can perform the following tasks with Ansible development tools from the command line, including the terminal in VS Code:
- Create an execution environment.
- Test your playbooks, roles, modules, plugins and collections.