All Projects → RobotsAndPencils → Terrible

RobotsAndPencils / Terrible

Licence: other
Transform Terraform state into Ansible inventories

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Terrible

Terraform Inventory
An Ansible dynamic inventory script to pair with nbering/terraform-provider-ansible.
Stars: ✭ 154 (+755.56%)
Mutual labels:  ansible, terraform
Azure arc
Automated Azure Arc environments
Stars: ✭ 224 (+1144.44%)
Mutual labels:  ansible, terraform
Terrible
An Ansible playbook that apply the principle of the Infrastructure as Code on a QEMU/KVM environment.
Stars: ✭ 161 (+794.44%)
Mutual labels:  ansible, terraform
Tensor
Tensor - Comprehensive web-based automation framework and Centralized infrastructure management platform
Stars: ✭ 136 (+655.56%)
Mutual labels:  ansible, terraform
Kubeoperator
KubeOperator 是一个开源的轻量级 Kubernetes 发行版,专注于帮助企业规划、部署和运营生产级别的 K8s 集群。
Stars: ✭ 4,147 (+22938.89%)
Mutual labels:  ansible, terraform
Ops Cli
Ops - cli wrapper for Terraform, Ansible, Helmfile and SSH for cloud automation
Stars: ✭ 152 (+744.44%)
Mutual labels:  ansible, terraform
Laravel Deployment
📗[WIP] 追求质量的 Laravel 应用部署上线课程。
Stars: ✭ 190 (+955.56%)
Mutual labels:  ansible, terraform
Terraform Null Ansible
Terraform Module to run ansible playbooks
Stars: ✭ 114 (+533.33%)
Mutual labels:  ansible, terraform
Tks
Enable enthusiasts and administrators alike to easily provision highly available and production-ready Kubernetes clusters on Proxmox VE.
Stars: ✭ 319 (+1672.22%)
Mutual labels:  ansible, terraform
Cloudblock
Cloudblock automates deployment of secure ad-blocking for all of your devices - even when mobile. Step-by-step text and video guides included! Compatible clouds include AWS, Azure, Google Cloud, and Oracle Cloud. Cloudblock deploys Wireguard VPN, Pi-Hole DNS Ad-blocking, and DNS over HTTPS in a cloud provider - or locally - using Terraform and Ansible.
Stars: ✭ 257 (+1327.78%)
Mutual labels:  ansible, terraform
Multi Env Deploy
Complete example of deploying complex web apps to AWS using Terraform, Ansible, and Packer
Stars: ✭ 132 (+633.33%)
Mutual labels:  ansible, terraform
Tads Boilerplate
Terraform + Ansible + Docker Swarm boilerplate = DevOps on 🔥🔥🔥 | Infrastructure as Code
Stars: ✭ 424 (+2255.56%)
Mutual labels:  ansible, terraform
Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (+605.56%)
Mutual labels:  ansible, terraform
Infrastructure As Code Tutorial
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Stars: ✭ 1,954 (+10755.56%)
Mutual labels:  ansible, terraform
Terraform Inventory
Terraform State → Ansible Dynamic Inventory
Stars: ✭ 1,591 (+8738.89%)
Mutual labels:  ansible, terraform
Stubbornjava
Unconventional Java code for building web servers / services without a framework. Think dropwizard but as a seed project instead of a framework. If this project had a theme it would be break the rules but be mindful of your decisions.
Stars: ✭ 184 (+922.22%)
Mutual labels:  ansible, terraform
Learning Tools
A collection of tools and files for learning new technologies
Stars: ✭ 1,287 (+7050%)
Mutual labels:  ansible, terraform
Polkadot Secure Validator
Polkadot Validator Secure Setup
Stars: ✭ 108 (+500%)
Mutual labels:  ansible, terraform
Detectionlab
Automate the creation of a lab environment complete with security tooling and logging best practices
Stars: ✭ 3,237 (+17883.33%)
Mutual labels:  ansible, terraform
Magic Modules
Automatically generate Google Cloud Platform support for OSS IaaC Projects
Stars: ✭ 358 (+1888.89%)
Mutual labels:  ansible, terraform

Terrible

A command line tool for transforming terraform state into ansible inventory files

Terraform is great at deploying infrastructure. This project aims to make using ansible and terraform together easy.

Installing

pip install git+git://github.com/RobotsAndPencils/terrible

Using

Write your terraform config as you usually would

# app.tf
resource "aws_instance" "app-server" {
    ami = "aminumber"
    instance_type = "t2.small"
    key_name = "keyname"
    count = 1
    tags {
        Name = "server"
    }

    connection {
        user = "ubuntu"
        key_file = "key_path"
    }
}

Create a Jinja2 template for your ansible inventory file

# ansible-inventory.j2
# Inventory for provisioning app-server
#
{% for resource in resources %}
{% for key, value in resource.iteritems() -%}
{% if "aws_instance.app-server" in key %}

[app-server]
# you can reference any terraform attribute
# https://www.terraform.io/docs/providers/aws/r/instance.html
{{ value.primary.attributes.public_ip }} ansible_ssh_user=ubuntu

{%- endif %}
{%- endfor %}
{%- endfor %}

Run terraform normally, then use terrible to convert terraform state to ansible inventory

terraform plan
terraform apply

terrible --template-path $PWD \
--template ansible-inventory.j2 \
--tfstate terraform.tfstate \
--inventory-output inventory.ini \

Now you can do normal ansible commands

ansible app-server -m ping --inventory-file=inventory.ini

Contributing

git clone [email protected]:RobotsAndPencils/terrible.git

You may want to set up a virtualenv by running virtualenv .venv; source .venv/bin/activate before you use the make file.

make setup
make test

Contact

Robots & Pencils Logo

Made with ❤️ by Robots & Pencils (@robotsNpencils)

Maintainers

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].