Chapter 2. Workflow for developing automation content
2.1. Workflow
2.1.1. Create
In the create stage, you create a new playbook project locally, using VS Code. The following is a typical workflow:
- Install and run the Ansible extension in VS Code.
- Scaffold a playbook project from VS Code.
- Add playbook files to your project and edit them in VS Code.
2.1.2. Test
-
Debug your playbook with the help of
ansible-lint
. - Select or create an automation execution environment so that your local environment replicates the environment on Ansible Automation Platform.
-
Run your playbooks from VS Code, using
ansible-playbook
or usingansible-navigator
with an execution environment. - Test your playbooks by running them on an execution environment that replicates your production environment.
2.1.3. Deploy
- Push your playbooks project to a source control repository.
- Set up credentials on Ansible Automation Platform to pull from your source control repository and create a project for your playbook repository.
- If you have created an execution environment, push it to private automation hub.
- Create a job template on Ansible Automation Platform that runs a playbook from your project, and specify the execution environment that you want to use.