300-435 Question 93
Single answerYou are tasked with automating the configuration of an IOS XE router using Ansible. The playbook must configure an interface with a specific IP address and description. Which Ansible module should you use in your playbook to achieve this?
- A
ios_config
- B
ios_facts
- C
ios_command
- D
ios_template
Show answer and explanation
Correct answer: A
Explanation
The ios_config module is specifically designed for pushing configuration changes to IOS XE devices. It allows you to specify configuration commands directly in the playbook, making it the most appropriate choice for configuring an interface with an IP address and description.
- A. Correct.
The ios_config module is used to push configuration changes to IOS XE devices. It allows you to configure interfaces, IP addresses, and other device settings through commands specified in the playbook.
- B. Incorrect.
The ios_facts module is used to gather facts about the IOS XE device, such as interface details, version, and other system information, but it does not configure the device.
- C. Incorrect.
The ios_command module is used to execute specific CLI commands on the device and retrieve their output, but it is not intended for configuration tasks.
- D. Incorrect.
The ios_template module is used for rendering and deploying configuration templates, but it is less direct compared to the ios_config module when pushing simple configuration changes.