Create playbooks and view playbook explanations
Using the Ansible VS Code extension, you can create Ansible playbooks using a natural language interface in English.
Red Hat Ansible Lightspeed with IBM watsonx Code Assistant reads the natural language prompts and generates an entire playbook recommendation based on your intent. You can also view the explanations for new or existing playbooks. The playbook explanations describe what the playbook does and contextualize its impact.
These capabilities enable Ansible developers to use natural language prompts to create new Ansible playbooks quickly and more efficiently and also get an explanation for existing Ansible playbook, thereby reducing the overall onboarding learning period.
You can create playbooks and view playbook explanations when connecting to the Red Hat Ansible Lightspeed cloud service and on-premise deployments.
Best practices to create playbooks Copy linkLink copied!
Follow these guidelines for the highest quality of a playbook recommendation.
- Ensure that the goal statements directly specify what the playbook must do.
Your statement should start with the goal of the playbook, for example,
Apply security patches to RHEL9. Avoid starting statements withCreate a playbook that,Please prepare a playbook that, orI need help with. - Ensure that the goal statement does not contain new lines.
- Ensure that the goal statement is not more than one sentence.
You might have to repeat the details in the goal statement to produce the best results. It is recommended that you use the generated outline as feedback about whether your goal statement might benefit from more or less details, and then modify the goal statement as necessary.
- Ensure the following when you edit the outline:
- Do not restate the goal of the playbook.
- Verify that the steps considered capture the key steps in the playbook. The steps need not reflect each and every task that is expected in the playbook.
- Keep the step description in one sentence without adding new lines to the outline.
Generate Ansible playbooks Copy linkLink copied!
You can use the natural language interface in the Ansible VS Code extension to generate an entire Ansible playbook.
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.
Procedure Copy linkLink copied!
View the playbook explanations Copy linkLink copied!
You can request explanations for a newly created playbook as well as an existing Ansible playbook.
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.
- You have opened the playbook whose explanation you want to view.