YaoLi
Flight Engineer Flight Engineer
Flight Engineer
  • 3,543 Views

Ansible vs terraform

Hi

I have a question about the terraform. I saw the terraform can used to Iaas Orchestration, and Ansible can do this too, so What is different both them?

Thanks

 
0 Kudos
3 Replies
Sillihkram
Flight Engineer
Flight Engineer
  • 3,523 Views

Terraform is an orchestrator. It uses Packer for automation. All of the plugins for packer must be written in the Go programing language (golang) however you can also incorporate chef and puppet.

Ansible is similar to Packer, Its modules can be written in any language (Bash, Python, Powershell, and many more) however there are so many modules you will likely never need to write one. All Automation is done using playbooks which are formatted in a human-readable data serialization language - YAML - which is both very easy to read, and very easy to write.

This is a good article to learn more:
https://logz.io/blog/terraform-ansible-puppet/


YaoLi
Flight Engineer Flight Engineer
Flight Engineer
  • 3,232 Views

Thank you reply.

0 Kudos
gbsalinetti
Flight Engineer Flight Engineer
Flight Engineer
  • 3,171 Views

Ansible and Terraform work at different levels. The first is an automation tool, while Terraform is an infrastructure provisioning tool.
Packer is not an alternative to Ansible, since it is an image creation tool that automates the building of images which can be used in different cloud providers.

Ansible and Terraform can work great together. You can create bare VMs in you infrastructure and then call Ansible from Terraform. Or you can invoke a Terraform deployment from Ansible using the dedicated terraform module, included in Ansible 2.5

For a deeper understanding, look at this video/transcript from Hashicorp: https://www.hashicorp.com/resources/ansible-terraform-better-together

To see what you can do with Packer look at this quickstart guide: https://www.packer.io/intro/index.html

Join the discussion
You must log in to join this conversation.