https://github.com/mrlesmithjr/ansible-docker
Enter description of Ansible role
https://github.com/mrlesmithjr/ansible-docker
ansible ansible-role
Last synced: 10 months ago
JSON representation
Enter description of Ansible role
- Host: GitHub
- URL: https://github.com/mrlesmithjr/ansible-docker
- Owner: mrlesmithjr
- License: mit
- Created: 2015-12-18T01:40:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-27T15:42:35.000Z (about 1 year ago)
- Last Synced: 2025-04-27T16:32:07.769Z (about 1 year ago)
- Topics: ansible, ansible-role
- Language: Jinja
- Size: 103 KB
- Stars: 15
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ansible-docker
Ansible role to install/configure Docker
## Build Status
### GitHub Actions
[](../../actions/workflows/test-molecule.yml)
## Requirements
For any required Ansible roles, review:
[requirements.yml](requirements.yml)
## Role Variables
[defaults/main.yml](defaults/main.yml)
## Dependencies
## Example Playbook
[playbook.yml](playbook.yml)
## License
MIT
## Author Information
Larry Smith Jr.
- [@mrlesmithjr](https://twitter.com/mrlesmithjr)
- [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com)
- [http://everythingshouldbevirtual.com](http://everythingshouldbevirtual.com)
> NOTE: Repo has been created/updated using [https://github.com/mrlesmithjr/cookiecutter-ansible-role](https://github.com/mrlesmithjr/cookiecutter-ansible-role) as a template.
## Development flow
### Install pipx for poetry
```bash
pip install pipx
pipx ensurepath
pipx install poetry
pipx inject poetry poetry-plugin-export
```
### Create env by poetry
```bash
# 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
```bash
# 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
```
```bash
poetry lock
poetry export --without-hashes --output requirements.txt
poetry export --without-hashes --only=dev --output requirements-dev.txt
```
### Fix linting errors
```bash
SKIP=no-commit-to-branch poetry run pre-commit run --all-files
# OR use
poetry run ansible-lint .
```
### Test molecule scenario
```bash
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
```