Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devenes/ansible-orchestration
Ansible Orchestration with Terraform and Bash to create instances within a security group, install and configure Nginx server on instances.
https://github.com/devenes/ansible-orchestration
amazon-linux-2 ansible ansible-playbook ansible-playbooks automation bash-script devops infrastructure infrastructure-as-code terraform ubuntu
Last synced: about 1 month ago
JSON representation
Ansible Orchestration with Terraform and Bash to create instances within a security group, install and configure Nginx server on instances.
- Host: GitHub
- URL: https://github.com/devenes/ansible-orchestration
- Owner: devenes
- License: mit
- Created: 2022-03-09T14:45:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-09T21:08:15.000Z (almost 3 years ago)
- Last Synced: 2024-11-09T07:35:39.256Z (3 months ago)
- Topics: amazon-linux-2, ansible, ansible-playbook, ansible-playbooks, automation, bash-script, devops, infrastructure, infrastructure-as-code, terraform, ubuntu
- Language: HCL
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Orchestration with Terraform and Bash
## Host Key Checking
If a host is reinstalled and has a different key in ‘known_hosts’, this will result in an error message until corrected. If a host is not initially in ‘known_hosts’ this will result in prompting for confirmation of the key, which results in an interactive experience if using Ansible, from say, cron. You might not want this.
- Ansible has host key checking enabled by default.
If you understand the implications and wish to disable this behavior, you can do so by editing /etc/ansible/ansible.cfg or ~/.ansible.cfg:
```
[defaults]
host_key_checking = False
```# What is Ansible?
Ansible is a software tool that provides simple but powerful automation for cross-platform computer support. It is primarily intended for IT professionals, who use it for application deployment, updates on workstations and servers, cloud provisioning, configuration management, intra-service orchestration, and nearly anything a systems administrator does on a weekly or daily basis. Ansible doesn't depend on agent software and has no additional security infrastructure, so it's easy to deploy.
Because Ansible is all about automation, it requires instructions to accomplish each job. With everything written down in simple script form, it's easy to do version control. The practical result of this is a major contribution to the "infrastructure as code" movement in IT: the idea that the maintenance of server and client infrastructure can and should be treated the same as software development, with repositories of self-documenting, proven, and executable solutions capable of running an organization regardless of staff changes.
While Ansible may be at the forefront of automation, systems administration, and DevOps, it's also useful to everyday users. Ansible allows you to configure not just one computer, but potentially a whole network of computers at once, and using it requires no programming skills. Instructions written for Ansible are human-readable. Whether you're entirely new to computers or an expert, Ansible files are easy to understand.
Check out the [Ansible Article](https://opensource.com/resources/what-ansible) for more information.
# Infrastructure as Code with Terraform
Infrastructure as code (IaC) tools allow you to manage infrastructure with configuration files rather than through a graphical user interface. IaC allows you to build, change, and manage your infrastructure in a safe, consistent, and repeatable way by defining resource configurations that you can version, reuse, and share.
Terraform plugins called providers let Terraform interact with cloud platforms and other services via their application programming interfaces (APIs). HashiCorp and the Terraform community have written over 1,000 providers to manage resources on Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, and DataDog, just to name a few. Find providers for many of the platforms and services you already use in the Terraform Registry. If you don't find the provider you're looking for, you can write your own.
Providers define individual units of infrastructure, for example compute instances or private networks, as resources. You can compose resources from different providers into reusable Terraform configurations called modules, and manage them with a consistent language and workflow.
Terraform's configuration language is declarative, meaning that it describes the desired end-state for your infrastructure, in contrast to procedural programming languages that require step-by-step instructions to perform tasks. Terraform providers automatically calculate dependencies between resources to create or destroy them in the correct order.
Terraform is HashiCorp's infrastructure as code tool. It lets you define resources and infrastructure in human-readable, declarative configuration files, and manages your infrastructure's lifecycle. Using Terraform has several advantages over manually managing your infrastructure:
- Terraform can manage infrastructure on multiple cloud platforms.
- The human-readable configuration language helps you write infrastructure code quickly.
- Terraform's state allows you to track resource changes throughout your deployments.
- You can commit your configurations to version control to safely collaborate on infrastructure.
Check out the [Terraform Documentation](https://learn.hashicorp.com/tutorials/terraform/infrastructure-as-code) for more information.