Courseiva

200-901 Infrastructure and Automation Practice Question

Exhibit

Refer to the exhibit.

---
- name: Configure interfaces
  hosts: switches
  gather_facts: no
  tasks:
    - name: Set interface description
      ios_config:
        lines:
          - description Lab-Interface
        parents: interface GigabitEthernet0/1

In the Ansible playbook snippet, what connection method is typically used for the ios_config module to communicate with the devices?

⚠ Common exam trap

Cisco often tests the distinction between connection methods by making candidates think 'local' is correct because it runs on the control node, but the trap is that ios_config requires a persistent SSH session to the device, which only network_cli provides.

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

✓

network_cli

The ios_config module is designed for Cisco IOS devices and requires a persistent network connection to send configuration commands. The network_cli connection method establishes an SSH session that remains open for the duration of the playbook task, allowing the module to send multiple CLI commands and handle prompts. This is the recommended connection method for ios_config because it supports privilege escalation and command responses needed for configuration changes.

Answer analysis

Option-by-option breakdown

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

  • ✗

    local

    Why it's wrong here

    The ios_config module runs on the control node and reaches devices over SSH, so connection: local would execute tasks against the controller itself. It is tempting because local suits modules that call APIs on the controller, such as cloud or REST-based modules, rather than network devices.

  • ✓

    network_cli

    Why this is correct

    The ios_config module runs on the control node but targets Cisco IOS devices over SSH, so the playbook uses the network_cli connection plugin, which handles CLI prompt and privilege escalation rather than a local or API-based transport.

  • ✗

    netconf

    Why it's wrong here

    The ios_config module uses network_cli over SSH, while netconf applies to modules such as iosxr_netconf or junos_config that push XML over port 830. It is tempting because NETCONF is a legitimate IOS-XE management interface, but ios_config itself does not use it.

  • ✗

    httpapi

    Why it's wrong here

    The ios_config module uses the network_cli connection over SSH, whereas httpapi targets REST-based platforms such as Fortinet or F5. It is tempting because httpapi suits appliances exposing HTTPS APIs, but IOS devices are configured through their CLI.

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 →

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.