Question 1
Topic: Network Automation
Skill tested: Build an idempotent Ansible playbook that updates interface descriptions across devices.
A regional operator manages IOS XE switches through Ansible and must standardize descriptions on interfaces listed per device in inventory variables. The playbook must target multiple switches, change only the requested interfaces, and remain safe to run repeatedly. The team uses the `cisco.ios` collection and requires configuration changes to be applied through a network resource module rather than raw CLI command strings. Which approach best meets these requirements?
The `cisco.ios.ios_interfaces` resource module models interface configuration and supports merging desired attributes into existing interface configuration. Inventory-driven interface data lets one play target multiple switches, while resource-state comparison supports idempotent repeated runs. `ios_facts` gathers information rather than configuring it. A controller-side shell session bypasses Ansible network modules and adds fragile connection handling. `ios_config` can configure devices, but the question explicitly requires a network resource module; additionally, forcing a changed result on every run defeats useful idempotence and change reporting.