Gumsible is a wrapper that helps you to easily run Ansible Molecule on Docker to Ansible roles
If you are using Linux or Mac OS X, Oh-My-Zsh is a great tool to manage your ZSH configuration.
Most of the GumGum Ops team uses Oh-My-Zsh, and if you see people using shortcuts in their terminal, the magic comes from here!
The Gumsible Oh-My-Zsh plugin is available on GitHub at https://github.com/Lowess/gumsible-oh-my-zsh-plugin.
Currently it offers the following commands:
gumsible check: Shortcut to runmolecule checkgumsible converge: Shortcut to runmolecule convergegumsible create: Shortcut to runmolecule creategumsible dependency: Shortcut to runmolecule dependencygumsible destroy: Shortcut to runmolecule destroygumsible idempotence: Shortcut to runmolecule idempotencegumsible init: Shortcut tomolecule init. Used to initialize a new Ansible role from a Cookiecutter template including the Molecule test framework.gumsible lint: Shortcut to runmolecule lintgumsible list: Shortcut to runmolecule listgumsible login: Shortcut to runmolecule logingumsible prepare: Shortcut to runmolecule preparegumsible side-effect: Shortcut to runmolecule side-effectgumsible syntax: Shortcut to runmolecule syntaxgumsible test: Shortcut to runmolecule testgumsible verify: Shortcut to runmolecule verify
It is not part of the official plugin list, so you need to install it manually:
- Edit your
~/.zshrcand addgumsibleto the list of plugins to enable:
plugins=( ... gumsible )
In the command line, change to oh-my-zsh’s custom plugin directory and clone the repository:
cd ~/.oh-my-zsh/custom/plugins && git clone https://github.com/Lowess/gumsible-oh-my-zsh-plugin gumsible && cd && . ~/.zshrc
By default you can use the plugin as it is, but you might want to customize the plugin behavior. You can change plugin settings by dropping a .gumsible file under your HOME folder (~/.gumsible). This repository contains an example configuration file that you can copy (you can comment / uncomment variables using #).
The settings file is a shell script sourced by the plugin.
#-- A Cookiecutter URL to init the new molecule role from:
# Examples:
# Public git repo: GUMSIBLE_MOLECULE_COOKIECUTTER_URL='https://github.com/retr0h/cookiecutter-molecule'
# Private git repo: GUMSIBLE_MOLECULE_COOKIECUTTER_URL='[email protected]:gumgum/ansible-role-cookiecutter.git'
GUMSIBLE_MOLECULE_COOKIECUTTER_URL='[email protected]:gumgum/ansible-role-cookiecutter.git'
#-- Boolean to specify if you want to start sidecar containers (ssh-agent companion and squid proxy)
GUMSIBLE_SIDECARS_ENABLED='true'
#-- Boolean to check for newly pushed `GUMSIBLE_DOCKER_IMAGE_NAME`
GUMSIBLE_UPDATES_ENABLED='false'
#-- Molecule Docker image to use
GUMSIBLE_DOCKER_IMAGE_NAME='quay.io/ansible/molecule'
#-- Molecule Docker version
GUMSIBLE_DOCKER_IMAGE_VERSION='latest'
#-- Ansible settings
ANSIBLE_STRATEGY='linear'