Free module
Infrastructure as code with OpenTofu and Ansible
Learn infrastructure as code hands on: OpenTofu plans, state, count and for_each, then Ansible roles, handlers, tags and Vault.
The lessons
Each lesson is free to read in full. Create a free account to run its commands in a live lab and to sit its quizzes and tasks.
1 · Virtual machine lab
OpenTofu plan, apply and state
I can run a plan, apply it and say what the state file is.
Read the lesson2 · Virtual machine lab
Variables, count and for_each in OpenTofu
I can make several of a thing from a variable.
Read the lesson3 · Virtual machine lab
How to read an OpenTofu plan
I can read a plan after a change and say what is created, changed or destroyed.
Read the lesson4 · Virtual machine lab
Ansible roles and variable precedence
I can lay out a role and say which variable wins.
Read the lesson5 · Virtual machine lab
Ansible templates and handlers
I can fill a template from variables and run a handler once.
Read the lesson6 · Virtual machine lab
Ansible tags and Vault
I can run part of a role and keep a secret out of plain text.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.