Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

pad92/docker-ansible-alpine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Ansible base image

Pipeline version Docker Pulls Docker Image Size Docker Stars

Usage

Environnement variable

Variable Default Value Usage
PIP_REQUIREMENTS requirements.txt install python library requirements
ANSIBLE_REQUIREMENTS requirements.yml install ansible galaxy roles requirements
DEPLOY_KEY pass an SSH private key to use in container

Mitogen

To enable mitogen, add this configuration into defaults in ansible.cfg file

[defaults]
strategy_plugins = /usr/lib/python3.11/site-packages/ansible_mitogen/plugins/strategy
strategy = mitogen_linear

Full documentation : https://mitogen.networkgenomics.com/ansible_detailed.html

Run Playbook

docker run -it --rm \
  -v ${PWD}:/ansible \
  pad92/ansible-alpine:latest \
  ansible-playbook -i inventory playbook.yml

Generate Base Role structure

docker run -it --rm \
  -v ${PWD}:/ansible \
  pad92/ansible-alpine:latest \
  ansible-galaxy init role-name

Lint Role

docker run -it --rm pad92/ansible-alpine:latest \
  -v ${PWD}:/ansible ansible-playbook tests/playbook.yml --syntax-check

Run with forwarding ssh agent

docker run -it --rm \
  -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \
  -v ${PWD}:/ansible \
  -e SSH_AUTH_SOCK=/ssh-agent \
  pad92/ansible-alpine:latest \
  sh

About

docker ansible container based on Alpine Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 55.5%
  • Dockerfile 44.5%