Courseiva
AutomationhardMultiple ChoiceObjective-mapped

350-601 Automation Practice Question

An organization is deploying Ansible for network automation across multiple Nexus 9000 leaf switches. They need to ensure that configuration tasks are idempotent and only apply changes when necessary. Which best practice should be followed when using the cisco.nxos.nxos_config module?

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

Use the 'replace' option with a provided configuration file to enforce desired state.

The 'replace' option in the cisco.nxos.nxos_config module allows you to provide a configuration file that defines the desired state, and the module will only apply changes if the current configuration does not match, ensuring idempotency. This is a best practice for network automation with Ansible on Nexus switches.

Answer analysis

Option-by-option breakdown

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

  • Write idempotent playbooks by checking 'show running-config' before each task.

    Why it's wrong here

    While possible, this is not a best practice with the module; the module already uses built-in idempotency via diff.

  • Use the 'replace' option with a provided configuration file to enforce desired state.

    Why this is correct

    The 'replace' option in the nxos_config module compares the running config with the provided config and applies only necessary changes, ensuring idempotency.

  • Set 'always_run' parameter to 'yes' to force execution.

    Why it's wrong here

    Setting always_run to yes forces execution even if no changes detected, which defeats idempotency and could cause unnecessary reloads.

  • Use the 'backup' option to always restore previous configuration.

    Why it's wrong here

    Backup creates a copy before changes but does not prevent re-applying the same configuration; idempotency is not achieved.

About these practice questions

One of 984 original 350-601 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-601 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-601 exam.