Example of a dummy cross-platform Ansible role. The purpose of this repo was to:
- Illustrate handling OS specific vars and tasks in Ansible roles
- Illustrate how a role can be tested across platforms using Molecule
- Illustrate the use of some nice Github features:
- Github Actions: To build a CI/CD pipelines for the role.
- Bots: To manage vulnearble dependencies (ie. dependabot) and pull requests (ie. stale)
- Issue Templates: To standarize community raised issues/questions
- Illustrate the use of good software developement practices:
- Virtual environments with pipenv
- enforcing coding standards:
- linters
- editorconfig
- pre-commit checks
- use of Makefile to provide a common interface to usual tasks such as 'lint', 'test' and hide complexity for end users.
- Commit message standarization and enforcement (ie: conventional commits via commitizen + pre-commit validations)
- Semantic versioning and releasing (ie:
semantic-release
)
NOTE: Role requires Fact Gathering by ansible!
One of the following OS families:
- Debian
- RedHat
- Windows
crossplatform_message
: Message to be printed
None
- name: Test the role
hosts: localhost
roles:
- ansible-role-crossplatform
To test:
ansible-playbook tests/test.yml -i tests/inventory
@donhector