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 check
gumsible converge
: Shortcut to runmolecule converge
gumsible create
: Shortcut to runmolecule create
gumsible dependency
: Shortcut to runmolecule dependency
gumsible destroy
: Shortcut to runmolecule destroy
gumsible idempotence
: Shortcut to runmolecule idempotence
gumsible 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 lint
gumsible list
: Shortcut to runmolecule list
gumsible login
: Shortcut to runmolecule login
gumsible prepare
: Shortcut to runmolecule prepare
gumsible side-effect
: Shortcut to runmolecule side-effect
gumsible syntax
: Shortcut to runmolecule syntax
gumsible test
: Shortcut to runmolecule test
gumsible verify
: Shortcut to runmolecule verify
It is not part of the official plugin list, so you need to install it manually:
- Edit your
~/.zshrc
and addgumsible
to 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='git@bitbucket.org:gumgum/ansible-role-cookiecutter.git'
GUMSIBLE_MOLECULE_COOKIECUTTER_URL='git@bitbucket.org: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'