aaronmcohen / ansible-role-dw-bdd-python-example

Sample code for "A Behavior Driven Developer's guide to Infrastructure as Code"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-role-dw-bdd-python-example

Sample code for "A Behavior Driven Developer's guide to Infrastructure as Code"

Prerequisites

The following software needs to be installed on your local machine to be successful.

Special consideration

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".

Getting Started

These instructions will help you run the sample code on your local machine for educational purposes.

Using make

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.

Manual steps

virtualenv -p python2 --clear venv
source ./venv/bin/activate
  • Install project pre-requisites
pip install -r ./requirements.txt; \
molecule test

When you are ready to leave the virtual environment run "deactivate"

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Sample code for "A Behavior Driven Developer's guide to Infrastructure as Code"

License:MIT License


Languages

Language:Python 55.5%Language:Gherkin 34.4%Language:Makefile 10.1%