Skip to content

robertdebock/ansible-playbook-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible playbook Terraform

This is an experiment to see how Ansible and Terraform can work together.

In this experiment, Ansible calls Terraform, saves the hosts into an in-memory inventory and runs Ansible to those hosts.

+--- playbook.yml ----+
| - run terraform     |
| - save hostnames    |
| - run Ansible roles |
+---------------------+

Setup

The state of the used roles:

Role name GitHub Action GitLab CI Version
apt_autostart github gitlab version
bootstrap github gitlab version
buildtools github gitlab version
ca_certificates github gitlab version
certbot github gitlab version
cron github gitlab version
digitalocean-agent github gitlab version
epel github gitlab version
fail2ban github gitlab version
firewall github gitlab version
httpd github gitlab version
openssl github gitlab version
python_pip github gitlab version
selinux github gitlab version
update github gitlab version
ansible-galaxy install -r roles/requirements.yml -f
cd terraform/
terraform init
cd ../

Create

./playbook

Destroy

cd terraform/
terraform destroy
cd ../

About

A demonstration of how Ansible and Terraform can work together.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages