Skip to content

Instantly share code, notes, and snippets.

View fletort's full-sized avatar

Fabien fletort

View GitHub Profile
@fletort
fletort / molecule.sh
Last active November 2, 2020 19:46
Molecule shortcut over molecule in container
#!/bin/bash
# Molecule shortcut over molecule inside container
# Coming from: https://gist.github.com/fletort/7a34c7f211acf0cde56c8f2749a3ec8b
# Use ./molecule.sh shell to login on the container bash
if [ "$1" = "shell" ] ; then
docker run --rm -it \
-v $(pwd):/tmp/$(basename "${PWD}") \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.cache/:/root/.cache/ \
@fletort
fletort / molecule_new_role.sh
Created July 16, 2020 23:34
Create Ansible Role from Molecule with the official Molecule docker image
#!/bin/bash
docker run --rm -it \
-v $(pwd):/tmp \
-w /tmp \
quay.io/ansible/molecule:3.0.6 \
molecule init role $1