200-901 Infrastructure and Automation Practice Question
A CI/CD pipeline for network automation includes stages for linting, unit testing, and deployment. Which stage typically validates the syntax of Ansible playbooks?
⚠ Common exam trap
Cisco often tests the distinction between linting (syntax/style checks) and unit testing (functional correctness of code), leading candidates to mistakenly choose unit testing for syntax validation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Linting stage
Linting is the stage that validates syntax and style for code or configuration files. In a CI/CD pipeline for network automation, the linting stage uses tools like `ansible-lint` to check Ansible playbooks for syntax errors, best practices, and idempotency issues before any testing or deployment occurs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Integration testing stage
Why it's wrong here
Integration testing verifies that components interact correctly across systems, not that playbook syntax parses. It is tempting because it precedes deployment and exercises real infrastructure, but syntax checking is a static parse performed by linting before any execution or integration occurs.
- ✗
Deployment stage
Why it's wrong here
Deployment executes the playbooks against target hosts, so syntax errors surface only after linting and testing should have caught them. Deployment is tempting because it is the stage where playbooks actually run, but syntax validation belongs earlier, where failures are cheap and block progression.
- ✗
Unit testing stage
Why it's wrong here
Unit testing exercises module behaviour and logic against expected outcomes, which presupposes the playbook already parses. It is tempting because it is an early pipeline gate, but syntax validation is a static analysis performed by linting, which runs before unit tests and fails fast on malformed YAML.
- ✓
Linting stage
Why this is correct
Linting parses Ansible playbooks with tools such as ansible-lint or yamllint, flagging syntax errors, malformed YAML and deprecated constructs before execution. This satisfies the pipeline's syntax-validation requirement, since unit testing exercises logic and deployment applies configuration, neither of which checks playbook syntax beforehand.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.