Operations: Ansible
Stand: July 15, 2026
This operations reference describes how Ansible automation becomes plannable, observable, and reversible. It covers runbooks, evidence, rollouts, troubleshooting, and responsibilities.
1. Goal
Deep Dive and Submission Example for Goal
A complete treatment of Goal contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Goal
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Goal
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Goal is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Goal
This section is not just a definition. In the workshop, Goal is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Goal
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Goal
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Goal
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Goal
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Goal is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
2. Operating Model
Deep Dive and Submission Example for Operating Model
A complete treatment of Operating Model contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Operating Model
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Operating Model
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Operating Model is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Operating Model
This section is not just a definition. In the workshop, Operating Model is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Operating Model
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Operating Model
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Operating Model
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Operating Model
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Operating Model is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
3. Standard Runbook
Deep Dive and Submission Example for Standard Runbook
A complete treatment of Standard Runbook contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Standard Runbook
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Standard Runbook
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Standard Runbook is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Standard Runbook
This section is not just a definition. In the workshop, Standard Runbook is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Standard Runbook
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Standard Runbook
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Standard Runbook
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Standard Runbook
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Standard Runbook is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
4. Preflight
Deep Dive and Submission Example for Preflight
A complete treatment of Preflight contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Preflight
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Preflight
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Preflight is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Preflight
This section is not just a definition. In the workshop, Preflight is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Preflight
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Preflight
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Preflight
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Preflight
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Preflight is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
5. Execution Evidence
Deep Dive and Submission Example for Execution Evidence
A complete treatment of Execution Evidence contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Execution Evidence
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Execution Evidence
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Execution Evidence is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Execution Evidence
This section is not just a definition. In the workshop, Execution Evidence is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Execution Evidence
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Execution Evidence
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Execution Evidence
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Execution Evidence
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Execution Evidence is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
6. Idempotence Evidence
Deep Dive and Submission Example for Idempotence Evidence
A complete treatment of Idempotence Evidence contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Idempotence Evidence
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Idempotence Evidence
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Idempotence Evidence is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Idempotence Evidence
This section is not just a definition. In the workshop, Idempotence Evidence is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Idempotence Evidence
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Idempotence Evidence
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Idempotence Evidence
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Idempotence Evidence
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Idempotence Evidence is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
7. Rollout Strategies
Deep Dive and Submission Example for Rollout Strategies
A complete treatment of Rollout Strategies contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Rollout Strategies
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Rollout Strategies
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Rollout Strategies is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Rollout Strategies
This section is not just a definition. In the workshop, Rollout Strategies is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Rollout Strategies
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Rollout Strategies
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Rollout Strategies
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Rollout Strategies
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Rollout Strategies is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
8. Rollback and Fix-forward
Deep Dive and Submission Example for Rollback and Fix-forward
A complete treatment of Rollback and Fix-forward contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Rollback and Fix-forward
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Rollback and Fix-forward
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Rollback and Fix-forward is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Rollback and Fix-forward
This section is not just a definition. In the workshop, Rollback and Fix-forward is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Rollback and Fix-forward
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Rollback and Fix-forward
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Rollback and Fix-forward
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Rollback and Fix-forward
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Rollback and Fix-forward is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
9. Inventories per Environment
Deep Dive and Submission Example for Inventories per Environment
A complete treatment of Inventories per Environment contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Inventories per Environment
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Inventories per Environment
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Inventories per Environment is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Inventories per Environment
This section is not just a definition. In the workshop, Inventories per Environment is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Inventories per Environment
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Inventories per Environment
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Inventories per Environment
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Inventories per Environment
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Inventories per Environment is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
10. Logging and Artifacts
Deep Dive and Submission Example for Logging and Artifacts
A complete treatment of Logging and Artifacts contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Logging and Artifacts
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Logging and Artifacts
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Logging and Artifacts is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Logging and Artifacts
This section is not just a definition. In the workshop, Logging and Artifacts is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Logging and Artifacts
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Logging and Artifacts
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Logging and Artifacts
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Logging and Artifacts
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Logging and Artifacts is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
11. AWX/AAP Operations
Deep Dive and Submission Example for AWX/AAP Operations
A complete treatment of AWX/AAP Operations contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for AWX/AAP Operations
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for AWX/AAP Operations
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, AWX/AAP Operations is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of AWX/AAP Operations
This section is not just a definition. In the workshop, AWX/AAP Operations is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for AWX/AAP Operations
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for AWX/AAP Operations
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for AWX/AAP Operations
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for AWX/AAP Operations
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
AWX/AAP Operations is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
12. Maintenance
Deep Dive and Submission Example for Maintenance
A complete treatment of Maintenance contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Maintenance
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Maintenance
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Maintenance is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Maintenance
This section is not just a definition. In the workshop, Maintenance is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Maintenance
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Maintenance
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Maintenance
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Maintenance
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Maintenance is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
13. Change Management
Deep Dive and Submission Example for Change Management
A complete treatment of Change Management contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Change Management
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Change Management
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Change Management is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Change Management
This section is not just a definition. In the workshop, Change Management is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Change Management
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Change Management
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Change Management
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Change Management
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Change Management is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
14. Incident Response
Deep Dive and Submission Example for Incident Response
A complete treatment of Incident Response contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Incident Response
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Incident Response
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Incident Response is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Incident Response
This section is not just a definition. In the workshop, Incident Response is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Incident Response
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Incident Response
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Incident Response
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Incident Response
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Incident Response is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
15. Operations Checklist
Deep Dive and Submission Example for Operations Checklist
A complete treatment of Operations Checklist contains both a technical artifact and a short domain explanation. The artifact can be an inventory, a playbook, a role, a template, a Vault file with dummy values, a CI configuration, or an evidence file. The explanation states why this path was chosen and which alternative was deliberately not used.
| Submission Part | Content | Minimum Quality |
|---|---|---|
| target description | what should be true after the run | measurable and without hidden assumptions |
| scope evidence | which hosts are affected | output from --list-hosts or inventory graph |
| implementation | which files were changed | small reviewable YAML files |
| validation | how it was checked | syntax check, check mode, diff, real run, second run |
| risk decision | what can go wrong | privileges, secrets, external dependencies, and rollback considered |
Minimal Artifacts for Operations Checklist
submission/
inventory/hosts.yml
playbooks/site.yml
evidence.md
cleanup.md
For roles or collections, the structure expands:
submission/
ansible.cfg
collections/requirements.yml
inventory/hosts.yml
roles/<role>/defaults/main.yml
roles/<role>/tasks/main.yml
roles/<role>/handlers/main.yml
playbooks/site.yml
evidence.md
Grading Expectation for Operations Checklist
A reviewable solution must be understandable to people who did not run it themselves. Screenshots or uncommented terminal output are not enough. Good evidence states context, command, relevant output, and assessment. If a module behaves differently in check mode, that limitation is explicitly documented.
Transfer to Real Teams
In a team context, Operations Checklist is connected to code review, branch rules, CI, role ownership, release notes, and operational approval. Production-like usage also documents ownership, maintenance window, monitoring, alerting, and rollback criteria.
Practical Relevance of Operations Checklist
This section is not just a definition. In the workshop, Operations Checklist is always validated through a concrete flow: inspect inventory, prove target hosts, check the playbook, simulate the change, run the change, evaluate a second run, and document cleanup. This shows whether Ansible really models desired state or merely executes a command successfully once.
| Review Question | Expected Answer |
|---|---|
| Which hosts are affected? | Pattern, group, --limit, and inventory output are documented. |
| Which data sources apply? | group_vars, host_vars, defaults, extra vars, and facts are known. |
| Which privileges are required? | become is close to the task and justified. |
| How is success proven? | Syntax check, check mode, diff, play recap, and second run are present. |
Example Flow for Operations Checklist
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --list-hosts
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
ansible-playbook -i inventory/hosts.yml playbooks/site.yml
The flow is intentionally complete. In real teams, some steps are automated but not skipped. CI can run syntax checks and linting; the domain review of scope, privileges, secret flows, and rollout risk remains a human engineering task.
Review Criteria for Operations Checklist
- Inventory and patterns are narrower than
allunless a reason is documented. - Modules from
ansible.builtinor reviewed collections are preferred. - Shell or command tasks include
changed_when,failed_when, or a clear reason. - Variables are placed predictably and do not override each other surprisingly.
- Secrets do not appear in plaintext, diffs, debug tasks, or CI logs.
- The playbook can run repeatedly without unnecessary changes.
- Cleanup, fix-forward, or controlled acceptance of the target state is documented.
Common Failure Modes for Operations Checklist
| Failure | Cause | Diagnosis |
|---|---|---|
| wrong hosts targeted | pattern or inventory misunderstood | --list-hosts, ansible-inventory --host |
unreachable |
SSH, user, Python, or network issue | -vvvv, SSH test, inventory variables |
| unexpected change | module not idempotent or wrong data source | second run, diff, variable inspection |
| secret leak | debug, diff, or log not scoped | check no_log, Vault, CI artifacts |
| handler does not run | no changed result or wrong handler name |
inspect task result and handler name |
Operations Note for Operations Checklist
For production-like usage, the lab must become a runbook. The runbook states target systems, owners, prerequisites, stop criteria, expected duration, validation, monitoring, and cleanup. Without those details, a playbook is executable but not operationally mature.
Operations Checklist is a practical building block of the Ansible workshop. The desired state must be described, executed against a controlled scope, and validated before and after the run. A solid Ansible workflow answers four questions: which hosts are targeted, which change is performed, which privileges are required, and how success is measured.
| Aspect | Workshop Meaning | Check |
|---|---|---|
| Scope | Inventory, pattern, --limit, tags, and environment select target systems. |
ansible-inventory --graph, ansible-playbook --list-hosts |
| State | Modules should model desired state and produce repeatable results. | second run without unnecessary changes |
| Privilege | become is used close to the task and justified. |
no broad global privilege without review |
| Evidence | Output, diffs, and summaries are documented. | play recap, diff, evidence file |
Typical commands:
ansible --version
ansible-config dump --only-changed
ansible-inventory -i inventory/hosts.yml --graph
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --syntax-check
ansible-playbook -i inventory/hosts.yml playbooks/site.yml --check --diff
For reviews, a playbook is ready only when it proves its target scope, exposes its data sources, protects sensitive values, describes failure paths, and remains stable after a second run. If a module does not fully support check mode or diff mode, that limitation belongs in the runbook.
Common mistakes are broad patterns such as all, unclear variable sources, shell workarounds without idempotence, secrets in debug output, missing rollback notes, and missing separation between lab and production inventory.
Sources and Further References
- Official Ansible Community Documentation: https://docs.ansible.com/
- Ansible Getting Started: https://docs.ansible.com/projects/ansible/latest/getting_started/index.html
- Inventory Guide: https://docs.ansible.com/projects/ansible/latest/inventory_guide/index.html
- Playbook Guide: https://docs.ansible.com/projects/ansible/latest/playbook_guide/index.html
- Module Index: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/index.html
- Vault Guide: https://docs.ansible.com/projects/ansible/latest/vault_guide/index.html
- Ansible Lint: https://ansible.readthedocs.io/projects/lint/
- Molecule: https://ansible.readthedocs.io/projects/molecule/
- AWX: https://github.com/ansible/awx
- Red Hat Certifications: https://www.redhat.com/en/services/certifications