We’re thrilled to introduce the new Ansible development tools!
The package provides an easy way to install and discover the best tools available to create and test Ansible content. The tools are focused on the workstation for automation creators using Visual Studio Code and it will be available in RPM format for RHEL as well as a container image for other operating systems.
These tools will also be a new supported feature of the Red Hat Ansible Automation Platform that brings together enterprise-grade capabilities to enable automation developers in the creating, testing, and deployment of Ansible content, all within a single package install.
As with every Red Hat product, there is an upstream version of Ansible development tools, which has been in a public repository for some time now, and we are looking to increase awareness and request feedback while fostering collaboration from the community at large.
The upstream ansible-dev-tools Python package also provides an easy way to install and discover the best tools available to create and test Ansible content, while also providing a space to share feedback and shape the future of the Ansible development tooling. Some of the highlights:
- Easy way to install and discover Ansible development tools
- Latest available development versions from PyPI
- Works with latest ansible-core
- CalVer based development and frequent releases
- Feedback and discussion in the Ansible Forum, GitHub and Matrix rooms
To make use of all the Ansible development tools in an easy and integrated way, we recommend using the Ansible VS Code Extension, which provides auto-completion and ties to your Ansible development environment, including ansible-lint, molecule, ansible-test and execution environments.
The Ansible development tools container image is also compatible with the Visual Studio Code Dev Containers feature and Github Spaces, allowing you to create a containerized Ansible development environment in your workstation’s Operating System of choice, be it Linux, Windows or Mac, by using Podman, the open source container, pod, and container image management engine, or even Docker if you already use it.
In addition to ansible-core, the curated list of tools installed as part of the Ansible automation developer tools package can be separated in 3 big groups:
Creation tools:
-
ansible-creator: The fastest way to scaffold all your Ansible content!
-
ansible-navigator A text-based user interface (TUI) for Ansible to help you in development and troubleshooting with execution environments.
-
ansible-dev-environment: A pip-like install for Ansible collections. Build and manage virtual environments for content development.
Testing tools:
-
ansible-lint: Checks Ansible playbooks for practices and behavior that could potentially be improved.
-
molecule: Molecule aids in the development and testing of Ansible content: playbooks, collections and roles
-
pytest-ansible: A pytest plugin that enables the use of Ansible in tests, enables the use of pytest as a collection unit test runner, and exposes molecule scenarios using a pytest fixture.
-
tox-ansible: The tox-ansible plugin dynamically creates a full matrix of python interpreter and ansible-core version environments for running integration, sanity, and unit for an Ansible collection both locally and in a Github action. tox virtual environments are leveraged for collection building, collection installation, dependency installation, and testing.
Deployment tools:
-
ansible-builder: Ansible Builder is a tool that automates the process of building execution environments using the schemas and tooling defined in various Ansible Collections and by the user.
-
ansible-sign: Utility for signing and verifying Ansible project directory contents.
What’s next?
We invite you all to try it out, join the project, contribute and let us know what you think! Are there any situations where things are not working as you would expect? Do you have a request for something you would like to see? If you post a new topic to the Ansible Forum, remember to tag it with devtools so that those interested can easily find it!
If you are attending DevConf.cz this week, Tim Appnel (@tima) and Don Naro (@oranod) will be doing a hands-on Workshop called “Introduction to creating automation with Ansible Development Tools” to show how everything works together in Visual Studio Code. It’s on Friday from 14:00 to 15:20 (Europe/Prague), in room A218. Add it to your favorites and remember to attend, limited to 20 seats only!
Also note that the productized and supported version of Ansible development tools will be Generally Available for subscribers with the release of Red Hat Ansible Automation Platform 2.5.
If you are a current Red Hat Ansible Automation Platform subscriber and are interested in trying the supported Ansible development tools, sharing feedback, reporting a bug or Requesting Features for Enhancements, a beta version is coming soon, we will let you know!