Skip to content

Ansible Collection: An opinionated way to set up a Tools VM. Initially for Ubuntu 18.04 only.

Notifications You must be signed in to change notification settings

matthewcosgrove/matthewcosgrove.tools_vm

Repository files navigation

Collection Molecule Tests BUCC Tools Role Molecule Tests Hashicorp Tools Role Molecule Tests Vim Role Molecule Tests Ubuntu User Role Molecule Tests Ansible Galaxy

Ansible Collection - matthewcosgrove.tools_vm

An opinionated way to set up a Tools VM. Initially for Ubuntu 18.04 only.

Development prereqs

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

Testing

Integration test of all roles via collection

# cd into the root of this repo then
molecule --debug test

Individual role

# cd into role dir e.g.
cd ~/collections/ansible_collections/matthewcosgrove/tools_vm
molecule --debug test

Release Process via GitHub Actions

  1. 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
  2. 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

About

Ansible Collection: An opinionated way to set up a Tools VM. Initially for Ubuntu 18.04 only.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages