Skip to content

mrlesmithjr/ansible-docker

Folders and files

NameName
Last commit message
Last commit date
Apr 28, 2025
Sep 4, 2020
Apr 26, 2020
Dec 27, 2018
Mar 16, 2025
Mar 16, 2025
Sep 4, 2020
Apr 26, 2020
Dec 18, 2015
Mar 16, 2025
Oct 7, 2021
Apr 28, 2025
Mar 15, 2025
Oct 7, 2021
Oct 7, 2021
Apr 26, 2020
Apr 26, 2020
Apr 26, 2020
Apr 26, 2020
Apr 28, 2025
Apr 26, 2020
Apr 28, 2025
Apr 28, 2025
Mar 16, 2025
Mar 16, 2025
Oct 7, 2021

Repository files navigation

ansible-docker

Ansible role to install/configure Docker

Build Status

GitHub Actions

Molecule Test

Requirements

For any required Ansible roles, review: requirements.yml

Role Variables

defaults/main.yml

Dependencies

Example Playbook

playbook.yml

License

MIT

Author Information

Larry Smith Jr.

NOTE: Repo has been created/updated using https://github.com/mrlesmithjr/cookiecutter-ansible-role as a template.

Development flow

Install pipx for poetry

pip install pipx
pipx ensurepath
pipx install poetry
pipx inject poetry poetry-plugin-export

Create env by poetry

# auto find system python verison by [tool.poetry.dependencies]
poetry env use
# OR use pyenv to find the path to the python3.9 executable
poetry env use $(pyenv which python3.9)

Install dependencies

# auto update dependencies
poetry install
# OR restore completely dependencies
poetry run pip install -r requirements.txt -r requirements-dev.txt

Export pyproject.toml to requirements

after add some new dependencies

poetry update molecule
poetry lock
poetry export --without-hashes --output requirements.txt
poetry export --without-hashes --only=dev --output requirements-dev.txt

Fix linting errors

SKIP=no-commit-to-branch poetry run pre-commit run --all-files
# OR use
poetry run ansible-lint .

Test molecule scenario

export ANSIBLE_CONFIG=$(pwd)/molecule/ansible.old-galaxy.cfg
poetry run molecule --debug -vvv test --scenario-name centos7
poetry run molecule --debug -vvv test --scenario-name centos8
poetry run molecule --debug -vvv test --scenario-name debian9
poetry run molecule --debug -vvv test --scenario-name debian10
poetry run molecule --debug -vvv test --scenario-name ubuntu1604
poetry run molecule --debug -vvv test --scenario-name ubuntu1804
poetry run molecule --debug -vvv test --scenario-name ubuntu2004

About

Enter description of Ansible role

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages