Courseiva
Automation and AssurancemediumMultiple ChoiceObjective-mapped

350-501 Automation and Assurance Practice Question

A team uses Ansible to automate configuration of Cisco devices. They want to ensure that configurations are applied only if the device is reachable and the current configuration differs from the intended. Which Ansible module or feature is best suited for this?

⚠ Common exam trap

Many exam-takers confuse `check_mode` with `ios_command` or `ios_facts`, assuming that simply gathering facts or running a command can determine configuration drift, but only `ios_config` with `check_mode` provides the idempotent diff-and-apply workflow required by the question.

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

ios_config with check_mode

The `ios_config` module with `check_mode` (enabled via the `--check` flag or `check_mode: yes`) allows Ansible to first verify device reachability and then compare the intended configuration against the running configuration without making changes. Only when a difference is detected and `check_mode` is disabled will the module apply the configuration changes. This directly meets the requirement of applying configurations only when the device is reachable and the current configuration differs from the intended.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ios_system

    Why it's wrong here

    ios_system configures system settings but does not provide idempotent change detection across the whole config.

  • net_get

    Why it's wrong here

    net_get is used to retrieve files from network devices, not to apply configurations.

  • ios_config with check_mode

    Why this is correct

    check_mode performs a diff and only applies changes when there is a difference, ensuring idempotency.

  • ios_command

    Why it's wrong here

    ios_command executes arbitrary commands without idempotency or change detection.

  • ios_facts

    Why it's wrong here

    ios_facts gathers information but does not apply configurations.

About these practice questions

Courseiva writes every 350-501 question from scratch — 971 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 350-501 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 350-501 exam.