Recognise how Ansible and Terraform express and apply desired infrastructure state through repeatable automation.
AnsibleTerraformPlaybookStateDeclarative
01 // Mental model
Start with the big picture.
Runs ordered tasks from playbooks against an inventory, commonly using modules and usually agentless connectivity.
CCNA focus: Know capabilities, not product trivia. Both support automation, but their models, state handling and common workflows differ. Protect credentials and review generated changes.
02 // Building blocks
Know what each part does.
01
Ansible
Runs ordered tasks from playbooks against an inventory, commonly using modules and usually agentless connectivity.
02
Terraform
Uses declarative configuration, providers and state to plan and apply infrastructure resource changes.
03
Desired state
The code describes what should exist; the tool works out actions needed to converge.
04
Reviewable change
Versioned files and plan/diff output make intended modifications visible before execution.
03 // Compare and recognise
Read the clues.
Item
What to remember
Inventory
Ansible's hosts and groups plus variables.
Playbook
YAML document describing plays and tasks.
Provider
Terraform plugin that manages a platform's API resources.
State
Terraform's mapping between configuration and managed real-world objects; protect it carefully.
04 // Mechanism comparison
Mechanism comparison.
Ansible: inventory -> playbook -> modules -> devices/services useful for configuration workflows and orchestrationTerraform: configuration -> plan -> reviewed changes -> apply provider APIs -> managed infrastructure resources state tracks resource relationships
Read the example from top to bottom, then verify the resulting state. Configuration is only complete when the output matches the intended design.
05 // Exam and troubleshooting
Turn facts into a method.
Ansible's hosts and groups plus variables.
YAML document describing plays and tasks.
Terraform plugin that manages a platform's API resources.
Terraform's mapping between configuration and managed real-world objects; protect it carefully.
Exam checkpoint: Know capabilities, not product trivia. Both support automation, but their models, state handling and common workflows differ. Protect credentials and review generated changes.