Skip to content

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

License

Notifications You must be signed in to change notification settings

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

Repository files navigation

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"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published