Ansible playbook run inside docker container ansible-runner
, with installed ansible
packages and galaxy collections.
- Build ansible runner first before running playbooks
- Run
make _build-ansible-runner
: this will created image with ansible inside.
- inside
local
directory make _init-ubuntu
: this will create 4 local ubuntu VMs and local inventory file
Check local Makefile recipes for local playbook commands
Base VM setup Playbooks:
make ping
: to check if connection worksmake play-ping
: run roles/base/ping to check group/hosts vars, facts, etcmake play-base
: basic VM setup (packages): git, docker, etc.
Project specific VM setup Playbooks:
make play-project-nginx
: install nginx and add project hostsmake play-project-backend
: deploy project backendmake play-project-ssh
: add SSH authorized keys
- inside
local
directory make _init-debian-12
: this will create 4 local Debian 12 VMs and local inventory file
Check local Makefile recipes for local playbook commands
Base VM setup Playbooks:
make ping
: to check if connection worksmake play-ping
: run roles/base/ping to check group/hosts vars, facts, etcmake play-base
: basic VM setup (packages): git, docker, etc.
Project specific VM setup Playbooks:
make play-project-nginx
: install nginx and add project hostsmake play-project-backend
: deploy project backendmake play-project-ssh
: add SSH authorized keys
Update ./inventory/remote/remote.ini
- add remote VM IP address and other configs (if needed)
Run Playbooks
- check Makefile recipes for playbook commands