Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_config.yaml

raw symbols SCIP
1 ---
2 # Execution of a task that adds or deletes the configuration of the
3 # management VRF ("mgmt") causes a disruption of the
4 # management interface connection on which playbook configuration
5 # commands are executing. As a result, playbook execution is aborted
6 # unless the management VRF configuration task is constructed to
7 # ignore errors.
8 #
9 # This example demonstrates how to combine tasks that configure other
10 # resource modules ("sonic_vrfs", in this case) with tasks that add or remove
11 # "management VRF" configuration.
12
13 - name: Example playbook of configuring with mgmt_vrf_on and mgmt_vrf_off tasks.
14 hosts: datacenter
15 gather_facts: false
16 connection: httpapi
17 collections:
18 - dellemc.enterprise_sonic
19 tasks:
20 - name: Turn on management VRF
21 ansible.builtin.include_tasks: mgmt_vrf_on.yaml
22 - name: Add VLANs
23 sonic_vlans:
24 config:
25 - vlan_id: 11
26 - vlan_id: 12
27 state: merged
28 - name: Turn off management VRF
29 ansible.builtin.include_tasks: mgmt_vrf_off.yaml