Sample code for "A Behavior Driven Developer's guide to Infrastructure as Code"
The following software needs to be installed on your local machine to be successful.
If you are running the Anaconda Python this may not work. Please point to the python distribution that came with your OS. This can be done by replacing "-p python2" with "--python=/usr/bin/python2.7" in the Makefile.
On the Mac you may need to install sshpass. This can be installed via Brew. Without this package you cannot pass a password from an inventory file and will need to leverage "--ask-pass".
These instructions will help you run the sample code on your local machine for educational purposes.
To ease use I have provided a Makefile to setup, run test, and clean-up. Simply run "make" in the project directory to start the process.
- Create a virtual environment
virtualenv -p python2 --clear venv
source ./venv/bin/activate
- Install project pre-requisites
pip install -r ./requirements.txt; \
- Run Molecule
molecule test
When you are ready to leave the virtual environment run "deactivate"
This project is licensed under the MIT License - see the LICENSE.md file for details