An opinionated way to set up a Tools VM. Initially for Ubuntu 18.04 only.
Clone the repo into a location as required by ANSIBLE_COLLECTIONS_PATHS
that enables running the molecule integration tests (See the env var set here)
mkdir -p ~/collections/ansible_collections/matthewcosgrove/tools_vm && cd "$_" && git clone https://github.com/matthewcosgrove/matthewcosgrove.tools_vm.git .
# then for convenience
ln -s ~/collections/ansible_collections/matthewcosgrove/tools_vm/ ~/matthewcosgrove.tools_vm
Initial installs (for Ubuntu, adapt for other OSs)
sudo apt install python3-venv
General Set Up
# cd into the root of this repo then
pip3 install pre-commit
pre-commit install
python3 -m venv .venv
source .venv/bin/activate
docker --version
pip3 install -U setuptools pip ansible ansible-lint yamllint 'molecule[docker]'
molecule --version
# cd into the root of this repo then
molecule --debug test
# cd into role dir e.g.
cd ~/collections/ansible_collections/matthewcosgrove/tools_vm
molecule --debug test
- Create a release with the next logical semantic version number using convention (see NOTE below) of prefix with letter v e.g.
v1.1.0
via https://github.com/matthewcosgrove/matthewcosgrove.tools_vm/releases/new - Check nothing went wrong https://github.com/matthewcosgrove/matthewcosgrove.tools_vm/actions?query=workflow%3A%22Ansible+Galaxy%22
NOTE: The version of galaxy.yml
is incremented dynamically as part of the GitHub Actions release. It is not currently persisted anywhere, but the version comes from the tag name so the convention above for semantic versioning is essential. It must be a tag called vMAJOR.MINOR.PATCH e.g. v1.1.0
. See the script used here