From 38b7c80217c4e72b1d8988eb1e60bb6e77334114 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:22 +0200 Subject: Adding upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- .../playbooks/common_examples/mgmt_vrf_config.yaml | 27 ++++++++++++++++++++++ .../playbooks/common_examples/mgmt_vrf_off.yaml | 6 +++++ .../playbooks/common_examples/mgmt_vrf_on.yaml | 6 +++++ 3 files changed, 39 insertions(+) create mode 100644 ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_config.yaml create mode 100644 ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_off.yaml create mode 100644 ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_on.yaml (limited to 'ansible_collections/dellemc/enterprise_sonic/playbooks') diff --git a/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_config.yaml b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_config.yaml new file mode 100644 index 000000000..24794ad76 --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_config.yaml @@ -0,0 +1,27 @@ +--- +# Execution of a task that adds or deletes the configuration of the +# management VRF ("mgmt") causes a disruption of the +# management interface connection on which playbook configuration +# commands are executing. As a result, playbook execution is aborted +# unless the management VRF configuration task is constructed to +# ignore errors. +# +# This example demonstrates how to combine tasks that configure other +# resource modules ("sonic_vrfs", in this case) with tasks that add or remove +# "management VRF" configuration. + +- name: Example playbook of configuring with mgmt_vrf_on and mgmt_vrf_off tasks. + hosts: datacenter + gather_facts: False + connection: httpapi + collections: + - dellemc.enterprise_sonic + tasks: + - include_tasks: mgmt_vrf_on.yaml + - name: Add VLANs + sonic_vlans: + config: + - vlan_id: 11 + - vlan_id: 12 + state: merged + - include_tasks: mgmt_vrf_off.yaml diff --git a/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_off.yaml b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_off.yaml new file mode 100644 index 000000000..c1c72f9ee --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_off.yaml @@ -0,0 +1,6 @@ +- name: Delete mgmt VRF configuration + sonic_vrfs: + config: + - name: mgmt + state: deleted + ignore_errors: yes diff --git a/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_on.yaml b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_on.yaml new file mode 100644 index 000000000..109b14fc0 --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/playbooks/common_examples/mgmt_vrf_on.yaml @@ -0,0 +1,6 @@ +- name: Create mgmt VRF configuration + sonic_vrfs: + config: + - name: mgmt + state: merged + ignore_errors: yes -- cgit v1.2.3