Skip to content

This repository provides a Docker-based setup for running Ansible, making it easy to manage and provision your infrastructure without needing to install Ansible directly on your machine.

Notifications You must be signed in to change notification settings

ygpark80/docker-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run Ansible with Docker

This repository provides a Docker-based setup for running Ansible.

Additional Components Besides Ansible

Usage

The easiest way you can run docker-ansible is using zx. For example:

npx zx https://raw.githubusercontent.com/ygpark80/docker-ansible/main/docker-ansible.mjs ansible-playbook

This command will download and run the docker-ansible script from the provided URL, and then run the ansible-playbook command inside a Docker container.

Alternatively, you can create an alias for ansible-playbook to run it inside the Docker container:

alias ansible-playbook='docker run --network host -v "${PWD}":/work:ro -v ~/.ansible/roles:/root/.ansible/roles --rm ygpark80/docker-ansible:latest ansible-playbook'

With this alias, you can run ansible-playbook commands as if you were running them directly on your machine.

That's it. Enjoy using docker-ansible! 😊

About

This repository provides a Docker-based setup for running Ansible, making it easy to manage and provision your infrastructure without needing to install Ansible directly on your machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published