Develop automation content in your workspace
The Ansible development tools are installed as part of the Ansible extension in the Ansible development workspace. You can use Ansible development tools to scaffold directories for automation content in your repository.
Using the Ansible extension ensures that best practices for directory structure are met.
Red Hat recommends that you create only one collection per repository, so that each collection has a clear, specific purpose. This approach promotes reusability, as each collection is a self-contained unit of content. A one-to-one relationship between a collection and its repository also improves manageability by simplifying dependency management, maintenance, and release cycles.
Create collections and playbooks in your Ansible development workspace Copy linkLink copied!
Use the Ansible extension in VS Code to use Ansible development tools to scaffold directories and files for your automation content. You can use Red Hat Ansible Lightspeed with IBM watsonx Code Assistant to help you write playbooks, and ansible-lint to debug them.
About this task Copy linkLink copied!
Procedure Copy linkLink copied!
Edit and debug automation content in your Ansible development workspace Copy linkLink copied!
You can continue to work in an existing workspace. Workspaces that are inactive might be paused due to an administrator-set timeout to free up resources. However, they will automatically relaunch when you select them from the OpenShift Dev Spaces dashboard.
About this task Copy linkLink copied!
Procedure Copy linkLink copied!
Execute playbooks in your Ansible development workspace Copy linkLink copied!
Execute your playbooks using the integrated Ansible extension or ansible-navigator within the VS Code environment of your workspace.
About this task Copy linkLink copied!
With the introduction of full container-in-container support, you can seamlessly use execution environments within Ansible development workspaces. Tools such as ansible-navigator and ansible-builder are fully supported for executing playbooks and building custom execution environments directly from your browser-based workspace.
Procedure Copy linkLink copied!
Configure ansible-navigator for execution environments Copy linkLink copied!
Customize ansible-navigator settings in your Ansible development workspace to configure execution environment options, logging, and output format.
Share your work Copy linkLink copied!
Share your automation content and collaborate with colleagues by working together from a single shared Git repository and submitting pull requests.