300-435 · Question #31
Refer to the exhibit. An engineer creates an Ansible playbook to configure VRF information using a local_vrfs variable. The code must be completed so that it can be tested. Which string completes…
The correct answer is A. present. To ensure that VRFs defined in the local_vrfs variable are created or exist on the device, the state parameter of the ios_vrf Ansible module must be set to present.
Question
- name: Create VRFs as defined by local_vrfs ios_vrf: vrfs: "{{ local_vrfs }}" state:
Options
- Apresent
- Bup
- Con
- Dactive
How the community answered
(47 responses)- A94% (44)
- B2% (1)
- C4% (2)
Why each option
To ensure that VRFs defined in the `local_vrfs` variable are created or exist on the device, the `state` parameter of the `ios_vrf` Ansible module must be set to `present`.
The `state: present` parameter in Ansible modules like `ios_vrf` instructs Ansible to ensure that the specified resource (in this case, VRFs defined by `local_vrfs`) exists and is configured on the target device.
`up` is not a standard `state` value for creating or managing configuration elements in Ansible modules; it typically refers to an operational status.
`on` is not a standard `state` value for creating or managing configuration elements in Ansible modules.
`active` is not a standard `state` value for creating or managing configuration elements in Ansible modules; it might describe an operational status but not the desired configuration state.
Concept tested: Ansible state parameter for configuration
Source: https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_vrf_module.html
Topics
Community Discussion
No community discussion yet for this question.