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 efficiently using the integrated Ansible extension within the VS Code environment of your workspace.
About this task Copy linkLink copied!
Procedure Copy linkLink copied!
You cannot use execution environments in Ansible development workspaces. Do not use ansible-navigator to execute playbooks.
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.