What Common Trait Do Ansible and Chef Share?

350-401 By islever Editorial Last updated

Short answer

B Both are used for mutable infrastructure.

Question

What is a common trait between Ansible and Chef?
  1. Both rely on a declarative approach.
  2. Both are used for mutable infrastructure. Correct Answer
  3. Both require a client to be installed on hosts.
  4. Both rely on NETCONF.

Key Takeaways

It tests your ability to differentiate between infrastructure provisioning paradigms (immutable) and configuration management paradigms (mutable), with the common trap being the conflation of declarative syntax with actual infrastructure lifecycle management.

This question evaluates the fundamental operational paradigm shared by popular configuration management tools. Industry standards and exam consensus classify both Ansible and Chef as solutions designed for managing mutable infrastructure, distinguishing them from immutable provisioning platforms.

Common mistake: Candidates frequently select Option A, assuming both tools are strictly declarative due to Ansible's YAML playbooks and Chef's resource abstractions. However, Chef relies heavily on Ruby-based procedural logic, and both tools inherently modify running systems rather than rebuilding them from scratch, making 'mutable infrastructure' the more accurate and exam-aligned common trait.

Expert Analysis

Understanding Mutable vs. Immutable Infrastructure

The core distinction tested here lies in how infrastructure is managed throughout its lifecycle. Tools like Terraform, Packer, and cloud-init focus on immutable infrastructure, where servers are destroyed and replaced rather than modified. In contrast, Ansible and Chef are configuration management tools explicitly designed for mutable infrastructure. They connect to running systems and apply changes incrementally to reach a desired state, which aligns perfectly with Option B. As highlighted in the widely cited Gruntwork engineering blog referenced by multiple candidates, CM tools "typically default to a mutable infrastructure paradigm."

Why Declarative Syntax Does Not Equal Declarative Infrastructure

Option A is the most debated distractor. While Ansible uses YAML playbooks that read declaratively, Chef relies on Ruby recipes that are largely procedural/imperative, specifying step-by-step instructions. Even when using DSLs, both tools operate within a mutable environment. The exam focuses on the infrastructure paradigm rather than the syntax style, making B the stronger, more universally accepted answer in the DevNet curriculum.

Eliminating Other Options

  • Option C is incorrect because Ansible is famously agentless, communicating over SSH/WinRM without requiring a persistent client daemon on target hosts. Chef, however, requires the chef-client agent.
  • Option D is incorrect because NETCONF is a network management protocol specifically for network devices (routers, switches). Neither Ansible nor Chef exclusively or primarily relies on it for general-purpose configuration management.

Exam Strategy

When comparing infrastructure tools, always separate "syntax paradigm" (declarative vs. procedural) from "operational paradigm" (mutable vs. immutable). For the DevNet exam, remember that Terraform and cloud providers handle immutable provisioning, while Ansible, Chef, and Puppet handle mutable configuration management. If an option describes how the tool interacts with running systems, prioritize that over language-specific syntax traits.

Community Votes

B
62%
A
38%

62% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 13 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 13

  1. c05e44e 👍 3
    Answer is B Configuration management tools such as Chef, Puppet, and Ansible typically default to a mutable infrastructure paradigm. Chef and Ansible encourage a procedural style where you write code that specifies, step-by-step, how to to achieve some desired end state. https://blog.gruntwork.io/why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c
  2. babanaber 👍 2 Answered B
    given answer seems to be correct https://blog.gruntwork.io/why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c#:~:text=Configuration%20management%20tools%20such%20as%20Chef%2C%20Puppet%2C%20and%20Ansible%20typically%20default%20to%20a%20mutable%20infrastructure%20paradigm.
  3. masrur 👍 2
    Answer is B: Chef and Ansible(mostly hybrid) are based on a procedural or imperative style where you write code that specifies a complete step-by-step process on how to achieve the desired end state
  4. RickAO76 👍 2 Answered B
    Vote changed to B here https://blog.gruntwork.io/why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c#b264
  5. cjoyce1980 👍 1 Answered A
    A. Both rely on a declarative approach. Here's a breakdown of the other options: B. Both are used for mutable infrastructure: While both Ansible and Chef can be used for mutable infrastructure, they are not exclusively tied to it. They can also be used for immutable infrastructure, depending on the specific use case. C. Both require a client to be installed on hosts: This is not true for Ansible. Ansible uses a push-based approach, where the control node sends commands to managed nodes using SSH or other protocols. Chef, on the other hand, requires an agent to be installed on managed nodes. D. Both rely on NETCONF: NETCONF is a configuration management protocol primarily used for network devices. Neither Ansible nor Chef relies on NETCONF for their core functionalities. Therefore, the common trait between Ansible and Chef is their use of a declarative approach. This means that you define the desired state of your infrastructure, and the tools will automatically make the necessary changes to achieve that state.
Show 8 more comments
  1. Adalberto 👍 1 Answered A
    The trait mentioned in option B, "Both are used for mutable infrastructure," does not apply to both Ansible and Chef. While it is true that both tools are used for configuration management and automation, the statement about mutable infrastructure does not accurately represent a common trait between Ansible and Chef. Therefore, the correct common trait is that both rely on a declarative approach (option A). If you have any more questions or need further explanations, feel free to ask!
  2. Shri_Fcb10 👍 1 Answered A
    Option B, "Both are used for mutable infrastructure," is not the best choice because Ansible and Chef can be used for both mutable and immutable infrastructure.
  3. RickAO76 👍 1 Answered A
    Ansible - YAML based playbooks Chef - Ruby based recipes / Cookbook
  4. stefanxradu 👍 3 Answered B
    B is correct
  5. leehyoeun 👍 2 Answered B
    i think answer is b
  6. 77a59d0 👍 1
    Answer B is correct
  7. shefo1 👍 1 Answered A
    wrong , A is right
  8. Adalberto 👍 1 Answered A
    A is the answear

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All 350-401 Questions

Access 218 questions with complete answers and detailed explanations.

View Full 350-401 Practice Test →

← Back to 350-401 Study Guide