Courseiva
mediumMultiple ChoiceObjective-mapped

200-901 Practice Question: A network automation engineer is using Ansible to…

A network automation engineer is using Ansible to manage Cisco IOS devices. The playbook includes a task that executes a 'show version' command and registers the output. The engineer then wants to parse the output to extract the IOS version. Which approach should be used?

⚠ Common exam trap

Cisco often tests the misconception that raw CLI output must be parsed manually, but the correct approach is to use dedicated facts modules that return structured data, avoiding fragile regex or template-based parsing.

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 'cisco.ios.ios_facts' module to get structured facts

The 'cisco.ios.ios_facts' module retrieves structured data from Cisco IOS devices, including the IOS version as a key-value pair in the Ansible facts dictionary. This eliminates the need for manual parsing, as the module uses the device's CLI or NETCONF to gather structured output, making it the most efficient and reliable approach for extracting specific device attributes.

Answer analysis

Option-by-option breakdown

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

  • Use the 'cisco.ios.ios_command' module and parse the output with regex

    Why it's wrong here

    Incorrect: While possible, 'ios_facts' is the recommended approach.

  • Use the 'cisco.ios.ios_command' module and the 'parse' option

    Why it's wrong here

    Incorrect: The 'parse' option is not available in 'ios_command'.

  • Use the 'cisco.ios.ios_config' module to retrieve the version

    Why it's wrong here

    Incorrect: 'ios_config' is for configuration, not show commands.

  • Use the 'cisco.ios.ios_facts' module to get structured facts

    Why this is correct

    Correct: 'ios_facts' returns structured data including the IOS version.

About these practice questions

This 200-901 question is part of Courseiva's 989-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 →

How Courseiva writes practice questions · Editorial policy

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.