Create roles and view roles explanations
You can create roles within Ansible collections using the Ansible VS Code extension. To create roles, use the Ansible VS Code extension, select the Role Generation option, and then enter the natural language prompts in English language.
Red Hat Ansible Lightspeed reads the natural language prompts and creates a role recommendation based on your intent. You can also view the explanations for new or existing roles. The role explanations describe what the role does and contextualize its impact.
These capabilities enable Ansible developers to use natural language prompts to create Ansible roles quickly and more efficiently, as well as get an explanation for existing Ansible roles. In addition to generating playbooks, role generation can now further reduce your team’s overall onboarding learning period. For information about Ansible roles, see Bundle content with Ansible roles in the Related Links section.
You can create roles and view role explanations when connecting to the Red Hat Ansible Lightspeed cloud service only.
Create roles within collections Copy linkLink copied!
You can use the natural language interface in the Ansible VS Code extension to create one or more roles within an Ansible collection.
Before you begin Copy linkLink copied!
- You meet one of the following requirements:
- Your organization has a trial or paid subscription to both the Red Hat Ansible Automation Platform and IBM watsonx Code Assistant.
- Your organization has a trial or paid subscription to the Red Hat Ansible Automation Platform, and you have a Red Hat Ansible Lightspeed trial account.
- You have installed and configured the Ansible VS Code extension v25.3.0 or later. For the procedure, see Installing and configuring the Ansible VS Code extension.
- You have an existing Ansible environment configured with a valid collection directory within the Ansible VS Code extension.
Procedure Copy linkLink copied!
View the role explanations Copy linkLink copied!
You can request explanations for a newly created role as well as an existing Ansible role.
Before you begin Copy linkLink copied!
- You meet one of the following requirements:
- Your organization has a trial or paid subscription to both the Red Hat Ansible Automation Platform and IBM watsonx Code Assistant.
- Your organization has a trial or paid subscription to the Red Hat Ansible Automation Platform, and you have a Red Hat Ansible Lightspeed trial account.
- You have installed and configured the Ansible VS Code extension v25.3.0 or later. For the procedure, see Installing and configuring the Ansible VS Code extension.
- You have opened the role whose explanation you want to view in the VS Code editor.