Bash 101

Bash strict mode One of my top favorite articles around base is unofficial-bash-strict-mode and I recommend anyone to read it in order to understand why they should start every new shell script with that line below, even if they plan to write only a couple of commands. {% code title="” %} #!/usr/bin/env bash set -euo pipefail # Or during development set -euxo pipefail {% endcode %} {% hint style="info” %} There are some gotchas regarding using the magic strict mode.

Lint via pre-commit tool

As a developer I always found annoying to have to wait a long minutes or hours in order to get a CI build failure caused by some linting errors. Or those cases where you spot the errors in commit message after you push. On the other hand, running linters and unit-tests before making any contribution is usually included in the documentation. We do know very well that we often forget to do it.

Mastering Molecule

Controlling verbosity Few things you may need to master quickly while working with molecule scenarios: how to control verbosity of different actions. # disable nologs export MOLECULE_NOLOG=0 # disable destroy export MOLECULE_DESTROY=never # debug mode (same as --debug) -- very verbose export MOLECULE_DEBUG=1 # change ansible own verbosity export ANSIBLE_VEBOSITY=2 Passing Ansible arguments In the end, molecule will call Ansible for testing your code but this does not mean that you cannot add your own options.


KISS Principle Simplicity is the Ultimate Sophistication A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away. — Antoine de Saint-Exupery “The price of free software is your time” “Those people who think they know everything are a great annoyance to those of us who do.” — Issac Asimov