Question 31 of 32 from exam 300-910-DEVOPS: Implementing DevOps Solutions and Practices using Cisco Platforms

Question 31 of 32 from exam 300-910-DEVOPS: Implementing DevOps Solutions and Practices using Cisco Platforms

Question

DRAG DROP - Construct an Ansible script to gather information about target routers and then use it to apply no ip redirects to every interface on each device.

Drag and drop the code from the bottom onto the correct location in the exhibit to complete the tasks section of the Ansible playbook so that it accomplishes your goal.

Select and Place:

Answer Area

provider: “{{ credentials }}”

dev_info

ip redirects’ to all interfaces

provider: “{{ credentials }}”

lines:
- “no ip redirects”
parents: “interface {{ item.key }}”
with items: “{{ dev_info[‘ansible facts’][‘ansible net_interfaces’] | dict2items }}”

debug register. variable:

ios_conf_t i0s_info: ios_facts:

ios_command ios_config

Explanations

Answer Area

tasks:
- name: Get info from devices

ios_info:

provider: “{{ credentials }}”

register. dev_info

- name: Add ‘no ip redirects’ to all interfaces

ios_config

provider: “{{ credentials }}”

lines:
- “no ip redirects”
parents: “interface {{ item.key }}”
with items: “{{ dev_info[‘ansible facts’][‘ansible net_interfaces’] | dict2items }}”

debug register. variable:

ios_conf_t i0s_info: ios_facts:

ios_command ios_config