Develop and execute projects in Dev Spaces
OpenShift Dev Spaces provides a web-based Integrated Development Environment that includes the Ansible VS Code extension and command line tools. You can use this environment to develop and test your automation code.
About this task Copy linkLink copied!
The OpenShift Dev Spaces instance provides a default configuration that installs the Ansible VS Code extension and provides the Ansible command line tools.
Procedure Copy linkLink copied!
OpenShift Dev Spaces is not included with your Ansible Automation Platform subscription or the Ansible plug-ins for Red Hat Developer Hub.
Execute automation tasks in Dev Spaces Copy linkLink copied!
The default configuration for Dev Spaces provides access to the Ansible command line tools.
Procedure Copy linkLink copied!
- Right-click a playbook name in the list of files.
- Select Run Ansible Playbook via ansible-navigator run or Run playbook via ansible-playbook.

Connect your project to Ansible Automation Platform Copy linkLink copied!
Access Ansible Automation Platform through the Red Hat Developer Hub to create a project for your playbook repository, then set up a job template that uses the playbook. You can go directly to your automation controller instance if it was not configured during the plug-in installation.
Procedure Copy linkLink copied!
Example: Automate a Red Hat Linux firewall configuration Copy linkLink copied!
This example demonstrates how the Ansible plug-ins can help Ansible users of all skill levels create quality Ansible content.
As an infrastructure engineer new to Ansible, you have been tasked to create a playbook to configure a Red Hat Enterprise Linux (RHEL) host firewall.
The following procedures show you how to use the Ansible plug-ins and Dev Spaces to develop a playbook.
Learn more about playbooks Copy linkLink copied!
The first step is to learn more about Ansible playbooks using the available learning paths.
Procedure Copy linkLink copied!
- Click the Ansible
Aicon in the Red Hat Developer Hub navigation panel. - Click Learn and select the Getting Started with Ansible Playbooks learning path. This redirects you to the Red Hat Developer website.
- If you are prompted to log in, create a Red Hat Developer account, or enter your details.
- Complete the learning path.