<story><title>Ansible 4.0</title><url>https://groups.google.com/g/ansible-devel/c/AeF2En1RGI8</url></story><parent_chain><item><author>zmmmmm</author><text>I know Ansible has a huge number of fans but I am genuinely curious about the future. That is, I&amp;#x27;ve been trying to figure out where ansible fits in the bigger picture of the modern trend towards IaC. Is it in conflict with that because of its semi-imperative nature? Or is what it does an essential piece of how IaC needs to work to do declarative infrastructure management? I see that for example you can use ansible within terraform. Do people really do that and is it useful? Or is it something you would only do if you have a lot of legacy infrastructure already configured via Ansible.&lt;p&gt;Curious on the general take here.</text></item></parent_chain><comment><author>shadycuz</author><text>So Ansible is a Configuration as Code tool (CaC). You know for configuring your servers and network things.&lt;p&gt;Terraform is a Infrastructure as Code tool (IaC). Great at deploying the underlying raw resources.&lt;p&gt;Just like you can take a screw driver and use it as a hammer, punch or pry bar. You could also deploy infra with Ansible or configure servers with Terraform. I have done it, seen others do it and try my best to avoid it. You really want the best tool for the job but sometimes you need the best tool for the person&amp;#x2F;situation. A air powered hammer is a really nice tool to have but if you are in a place where they don&amp;#x27;t have compressed air, then a regular hammer will do and if the locals don&amp;#x27;t have hammers, then find a rock. So sometimes we do weird things with our tools, is it useful? Possibly to the person at the time.&lt;p&gt;I don&amp;#x27;t think Ansible is trying to fit into IaC. I think CaC and IaC are just a set of tools that are trying to fit into DevOps&amp;#x2F;SRE.&lt;p&gt;A really nice approach I have built for clients over the years when deploying non-containerized applications is to use Packer with Ansible to build a image of the server. Then use Terraform to deploy the infra. Then comeback with Ansible to do runtime stuff like Security tools, enroll into monitoring and also deploy the running application if not already baked into the image.&lt;p&gt;If you are containerized then just switch out packer for docker.</text></comment>
<story><title>Ansible 4.0</title><url>https://groups.google.com/g/ansible-devel/c/AeF2En1RGI8</url></story><parent_chain><item><author>zmmmmm</author><text>I know Ansible has a huge number of fans but I am genuinely curious about the future. That is, I&amp;#x27;ve been trying to figure out where ansible fits in the bigger picture of the modern trend towards IaC. Is it in conflict with that because of its semi-imperative nature? Or is what it does an essential piece of how IaC needs to work to do declarative infrastructure management? I see that for example you can use ansible within terraform. Do people really do that and is it useful? Or is it something you would only do if you have a lot of legacy infrastructure already configured via Ansible.&lt;p&gt;Curious on the general take here.</text></item></parent_chain><comment><author>jbmsf</author><text>When I set up a product deployment system, I want:&lt;p&gt;1. IaC for the network, database, container definitions, and other cloud things. I use terraform here.
 2. CI&amp;#x2F;CD for the application software, which ultimately builds a container image from version control, tags it in some well-know way, and tells the container scheduler to redeploy. I tend to use CircleCI, but any CI solution will do.
 3. Configuration management for my container definitions, injecting environment variables for config&amp;#x2F;secrets into the definition or runtime. I tend to use Ansible or Terraform here.&lt;p&gt;For me, the main criteria is whether the product has a large number of components with configuration that needs to reuse common structures. If I&amp;#x27;m just deploying one or two components (e.g. your typical early-stage monolith), Terraform is fine. Bt if you have many users contributing to many components and want to provide higher-level tools, I vastly prefer using Ansible; you just have more control.&lt;p&gt;That is, I believe in Ansible as a tool for applying configuration from source control to some other system; I would no longer use it to provision cloud resources.</text></comment>