Giter VIP home page Giter VIP logo

ansible-terraform's Introduction

ansible-terraform

An Ansible role for installing Terraform.

Role Variables

  • terraform_version - Terraform version

Testing

Tests are done using molecule. To run the test suite, install molecule and its dependencies and run molecule test from the folder containing molecule.yml. To add additional tests, add a testinfra python script in the tests directory, or add a function to test_terraform.py. Information about available Testinfra modules is available here.

Example

# Download molecule, dependencies
$ pip install molecule

# Change to the top-level project directory, which contains molecule.yml
$ cd /path/to/ansible-terraform

# Ensure that molecule.yml is present
$ ls
CHANGELOG.md                             molecule.yml
LICENSE                                  playbook.retry
README.md                                playbook.yml
ansible.cfg                              tasks
defaults                                 templates
handlers                                 tests
meta                                     

# We're in the right directory, so let's run tests!
$ molecule test

ansible-terraform's People

Contributors

hectcastro avatar tnation14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-terraform's Issues

ImportError: No module named cryptography.hazmat.backends

I installed molecule to run the unit tests but got this error. Which version of molecule should be used?

> molecule test
Traceback (most recent call last):
  File "/var/projects/ansible-terraform/env/bin/molecule", line 7, in <module>
    from molecule.cli import main
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/cli.py", line 45, in <module>
    from molecule import commands
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/commands/__init__.py", line 25, in <module>
    from molecule.commands import base  # noqa
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/commands/base.py", line 24, in <module>
    from molecule import core
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/core.py", line 32, in <module>
    from molecule import config
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/config.py", line 27, in <module>
    from molecule import utilities
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/molecule/utilities.py", line 31, in <module>
    import paramiko
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/paramiko/__init__.py", line 30, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/var/projects/ansible-terraform/env/local/lib/python2.7/site-packages/paramiko/transport.py", line 32, in <module>
    from cryptography.hazmat.backends import default_backend
ImportError: No module named cryptography.hazmat.backends

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.