Chapter 2. Workflow for developing automation content
2.1. Workflow Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
2.1.1. Create Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
-
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-playbookor usingansible-navigatorwith an execution environment. - Test your playbooks by running them on an execution environment that replicates your production environment.
2.1.3. Deploy Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
- 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.