Auto-generate the structure and files for your automation project
Use the Ansible Automation Platform VS Code extension to scaffold a new Ansible playbook project. This process creates the necessary directory structure and configuration files, preparing your environment for playbook development.
Scaffold a playbook project Copy linkLink copied!
The following steps describe the process for scaffolding a new playbook project with the Ansible VS Code extension.
Before you begin Copy linkLink copied!
- You have installed Ansible development tools.
- You have installed and opened the Ansible VS Code extension.
- You have identified a directory where you want to save the project.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
After the project directory has been created, the following message appears in the Logs pane of the Create Ansible Project tab. In this example, the destination directory name is destination_directory_name.
------------------ ansible-creator logs ------------------
Note: ansible project created at /Users/username/test_project
The following directories and files are created in your project directory:
$ tree -a -L 5 .
├── .devcontainer
│ ├── devcontainer.json
│ ├── docker
│ │ └── devcontainer.json
│ └── podman
│ └── devcontainer.json
├── .gitignore
├── README.md
├── ansible-navigator.yml
├── ansible.cfg
├── collections
│ ├── ansible_collections
│ │ └── scm_organization_name
│ │ └── scm_project_name
│ └── requirements.yml
├── devfile.yaml
├── inventory
│ ├── group_vars
│ │ ├── all.yml
│ │ └── web_servers.yml
│ ├── host_vars
│ │ ├── server1.yml
│ │ ├── server2.yml
│ │ ├── server3.yml
│ │ ├── switch1.yml
│ │ └── switch2.yml
│ └── hosts.yml
├── linux_playbook.yml
├── network_playbook.yml
└── site.yml