Skip to content

mrlesmithjr/ansible-docker

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

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages