this post was submitted on 30 Oct 2024
32 points (92.1% liked)
Linux
48012 readers
759 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ansible is a legitimate way to provision a VM, but that's not it's strong suit. You should look into Teraform as it's more industry standard.
I always find it tricky to understand how tools all relate to each other in an ecosystem and this is a great example of why: the fact that Ansible can do this task, but Teraform would be better suggests that they are tools that have different purposes, but some overlap. What would you say is Ansible's strong suit?
configuration management; aka infrastructure as code. terraform creates the instance and then ansible sets it up and you can copy and paste your playbooks to make it repeatable into infinity and that's called infrastructure as code.
it's literally in interview questions and in take home assessments; you're well ahead of the curve.
i literally get paid to do this and; once you figure it out; you should too.
Again, capable of a lot but it's best at configuration management. I like to use Ansible after I install an OS to do things like tweak SSH to be more secure, install Fish shell, set common environment variables and aliases, create a bin folder in my home directory, and clone down a bunch of custom scripts I have and a remote Git repository. You can do this kind of thing with a bash script also but with a well written ansible playbook you can run it over and over and it can fix configuration drift (in my example it could ensure my repository of scripts is up to date).
Wait can you achieve the same as ansible with terraform?
To provision VMs yes, to configure them I think Ansible works best. But you can call Ansible from Terraform.