{ "info": { "author": "Michael J. Palmer", "author_email": "palmertime@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "========\nterrible\n========\n\n\n.. image:: https://img.shields.io/pypi/v/terrible.svg\n :target: https://pypi.python.org/pypi/terrible\n\n.. image:: https://img.shields.io/travis/palmertime/terrible.svg\n :target: https://travis-ci.org/palmertime/terrible\n\n.. image:: https://readthedocs.org/projects/terrible/badge/?version=latest\n :target: https://terrible.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/palmertime/terrible/shield.svg\n :target: https://pyup.io/repos/github/palmertime/terrible/\n :alt: Updates\n\n\nTerrible (TERRaform to ansIBLE) creates dynamic Ansible inventory from Terraform\nstate.\n\n\n* Free software: Apache Software License 2.0\n* Documentation: https://terrible.readthedocs.io.\n\n\nInstallation\n------------\n\nTo install terrible, run this command in your terminal.::\n\n $ pip install terrible\n\nOnce installed a symbolic link or shell script can be added to the Ansible\ninventory directory.\n\nSymbolic link.::\n\n $ ln -s /path/to/terrible inventory/terrible\n\nSimple shell script wrapper.::\n\n #!/usr/bin/env bash\n terrible \"$@\"\n\n\nUsage\n-----\n\n::\n\n Usage: terrible [OPTIONS] \n\n Terrible extracts Ansible inventory data from Terraform state. The\n is relative to the directory where Ansible is executed but\n defaults to ./terraform in the current directory.\n\n Options:\n --host TEXT Show varibles for single host\n --list List all variables\n --nometa Remove _meta from output\n --pretty Make json look pretty\n --help Show this message and exit.\n\n\nFeatures\n--------\n\nTerraform Resources:\n^^^^^^^^^^^^^^^^^^^^\n\n* VMware vSphere (`vsphere_virtual_machine`_)\n* AWS Instance (`aws_instance`_)\n\n.. _`vsphere_virtual_machine`: https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html\n.. _`aws_instance`: https://www.terraform.io/docs/providers/aws/r/instance.html\n\n\nCommon Parameters\n^^^^^^^^^^^^^^^^^\n\nThese can be specified by all resources. Uniq configuration details are\ndocumented in specific sections below.\n\n**ansible_user** (Optional)\n The user that Ansible will connect to the host. Defaults to root if not specified.\n\n**ansible_group** (Optional)\n The inventory group associated with the resource. (Add default All group?)\n\n**ansible_host** (Optional)\n The host that Ansible will connect to. VMware defaults to IP of 1st interface,\n ``network_interface:0`` but if can be overwriten to an specific IP. AWS\n defaults to ``public_ip`` and configuralbe to ``private_ip``.\n (TODO: Add test and error condition for values)\n\n\nVMware\n^^^^^^\n\nWhen defining Terraform ``vsphere_virtual_machine`` resource use the\n``custom_configuration_parameters`` block to set Ansible parameters.\n\nConfiguration example::\n\n custom_configuration_parameters {\n ansible_group = \"api-gateway\"\n ansible_user = \"ansible\"\n ansible_host = \"192.168.52.101\"\n }\n\n\nAWS\n^^^\n\nWhen defining a Terraform ``aws-instance`` resource use tags to set Ansible\nparameters.\n\n**ansible_ssh_private_key_file**\n The key used to connect to AWS instance. The value is the path to the private\n key that matches the defined AWS instance key_name. Defaults to the value of\n ``key_name + .pem``. EXAMPLE: If your AWS instance key_name is ``terraform``\n then Ansible would look in the current working directory for terraform.pem\n\nConfiguration example::\n\n tags {\n Name = \"app1-aws\"\n ansible_groups = \"webapp\"\n ansible_user = \"ansible\"\n ansible_host = \"private_ip\"\n ansible_ssh_private_key_file = \"aws-keys/webapp-terraform.pem\"\n }\n\n\n\nDirectory Layout\n^^^^^^^^^^^^^^^^\n\nBy default, Terrible looks for the ``terraform`` inside the Ansible playbook root directory.::\n\n .\n \u251c\u2500\u2500 ansible.cfg\n \u251c\u2500\u2500 inventory\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 group_vars\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 terrible\n \u251c\u2500\u2500 playbooks\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 site.yml\n \u251c\u2500\u2500 requirements.yml\n \u251c\u2500\u2500 roles\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 example_role\n \u2514\u2500\u2500 terraform\n \u251c\u2500\u2500 terraform.tf\n \u251c\u2500\u2500 terraform.tfstate\n \u251c\u2500\u2500 terraform.tfvars\n \u2514\u2500\u2500 variables.tf\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\nThis package was greatly influenced by the `sean-abbott/terraform.py`_ project.\n\n.. _`sean-abbott/terraform.py`: https://github.com/sean-abbott/terraform.py\n\n\n=======\nHistory\n=======\n\n0.1.2 (2017-08-21)\n------------------\n\n* bump version testing\n\n0.1.1 (2017-08-21)\n------------------\n\n* Support for ``aws_instance`` and ``vsphere_virtual_machine`` Terraform resources.\n* Ansible parameters available: ansible_user, ansible_host, ansible_ssh_private_key_file\n* Define Terraform resource to ansible group.\n\n0.1.0 (2017-08-10)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/palmertime/terrible", "keywords": "terrible", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "terrible", "package_url": "https://pypi.org/project/terrible/", "platform": "", "project_url": "https://pypi.org/project/terrible/", "project_urls": { "Homepage": "https://github.com/palmertime/terrible" }, "release_url": "https://pypi.org/project/terrible/0.1.2/", "requires_dist": [ "Click (>=6.0)" ], "requires_python": "", "summary": "Ansible dynamic inventory from Terraform", "version": "0.1.2" }, "last_serial": 3112150, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "debdf96149ac3a8560e96de935725cbf", "sha256": "6d8fa5192a164cdc6f6bda2b53998c46262d5544b8191201f4a305e3eb08f777" }, "downloads": -1, "filename": "terrible-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "debdf96149ac3a8560e96de935725cbf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8853, "upload_time": "2017-08-21T15:21:55", "url": "https://files.pythonhosted.org/packages/37/94/64cf9a4a17e1a591999e0b346874ddec8800dec9cebe67d274fa9edc291f/terrible-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "395d89d991c3f574e8289f3181c3b654", "sha256": "626ec1d5101d19adabf0b4d4cee39ba4b4e3722caf3d32a60f774ec41f0509c9" }, "downloads": -1, "filename": "terrible-0.1.2.tar.gz", "has_sig": false, "md5_digest": "395d89d991c3f574e8289f3181c3b654", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16649, "upload_time": "2017-08-21T15:21:57", "url": "https://files.pythonhosted.org/packages/53/18/461420560cb759b22e318f74f8853989555d22103c59b2f9a23bc38cc5e4/terrible-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "debdf96149ac3a8560e96de935725cbf", "sha256": "6d8fa5192a164cdc6f6bda2b53998c46262d5544b8191201f4a305e3eb08f777" }, "downloads": -1, "filename": "terrible-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "debdf96149ac3a8560e96de935725cbf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8853, "upload_time": "2017-08-21T15:21:55", "url": "https://files.pythonhosted.org/packages/37/94/64cf9a4a17e1a591999e0b346874ddec8800dec9cebe67d274fa9edc291f/terrible-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "395d89d991c3f574e8289f3181c3b654", "sha256": "626ec1d5101d19adabf0b4d4cee39ba4b4e3722caf3d32a60f774ec41f0509c9" }, "downloads": -1, "filename": "terrible-0.1.2.tar.gz", "has_sig": false, "md5_digest": "395d89d991c3f574e8289f3181c3b654", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16649, "upload_time": "2017-08-21T15:21:57", "url": "https://files.pythonhosted.org/packages/53/18/461420560cb759b22e318f74f8853989555d22103c59b2f9a23bc38cc5e4/terrible-0.1.2.tar.gz" } ] }