| 1 | --- |
| 2 | - name: Dell OpenManage Ansible smart fabric uplink configuration. |
| 3 | hosts: ome |
| 4 | gather_facts: false |
| 5 | |
| 6 | tasks: |
| 7 | - name: Create a Uplink |
| 8 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 9 | hostname: "{{ hostname }}" |
| 10 | username: "{{ username }}" |
| 11 | password: "{{ password }}" |
| 12 | ca_path: "/path/to/ca_cert.pem" |
| 13 | state: "present" |
| 14 | fabric_name: "fabric1" |
| 15 | name: "uplink1" |
| 16 | description: "CREATED from OMAM" |
| 17 | uplink_type: "Ethernet" |
| 18 | ufd_enable: "Enabled" |
| 19 | primary_switch_service_tag: "ABC1234" |
| 20 | primary_switch_ports: |
| 21 | - ethernet1/1/13 |
| 22 | - ethernet1/1/14 |
| 23 | secondary_switch_service_tag: "XYZ1234" |
| 24 | secondary_switch_ports: |
| 25 | - ethernet1/1/13 |
| 26 | - ethernet1/1/14 |
| 27 | tagged_networks: |
| 28 | - vlan1 |
| 29 | - vlan3 |
| 30 | untagged_network: vlan2 |
| 31 | tags: create_uplink |
| 32 | delegate_to: localhost |
| 33 | |
| 34 | - name: Modify a existing uplink1 |
| 35 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 36 | hostname: "{{ hostname }}" |
| 37 | username: "{{ username }}" |
| 38 | password: "{{ password }}" |
| 39 | ca_path: "/path/to/ca_cert.pem" |
| 40 | state: "present" |
| 41 | fabric_name: "fabric1" |
| 42 | name: "uplink1" |
| 43 | new_name: "uplink2" |
| 44 | description: "Modified from OMAM" |
| 45 | uplink_type: "Ethernet" |
| 46 | ufd_enable: "Disabled" |
| 47 | primary_switch_service_tag: "DEF1234" |
| 48 | primary_switch_ports: |
| 49 | - ethernet1/2/13 |
| 50 | - ethernet1/2/14 |
| 51 | secondary_switch_service_tag: "TUV1234" |
| 52 | secondary_switch_ports: |
| 53 | - ethernet1/2/13 |
| 54 | - ethernet1/2/14 |
| 55 | tagged_networks: |
| 56 | - vlan11 |
| 57 | - vlan33 |
| 58 | untagged_network: vlan22 |
| 59 | tags: modify_uplink |
| 60 | delegate_to: localhost |
| 61 | |
| 62 | - name: Delete a Uplink |
| 63 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 64 | hostname: "{{ hostname }}" |
| 65 | username: "{{ username }}" |
| 66 | password: "{{ password }}" |
| 67 | ca_path: "/path/to/ca_cert.pem" |
| 68 | state: "absent" |
| 69 | fabric_name: "fabric1" |
| 70 | name: "uplink1" |
| 71 | tags: delete_uplink |
| 72 | delegate_to: localhost |
| 73 | |
| 74 | - name: Modify the Uplink name |
| 75 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 76 | hostname: "{{ hostname }}" |
| 77 | username: "{{ username }}" |
| 78 | password: "{{ password }}" |
| 79 | ca_path: "/path/to/ca_cert.pem" |
| 80 | state: "present" |
| 81 | fabric_name: "fabric1" |
| 82 | name: "uplink1" |
| 83 | new_name: "uplink2" |
| 84 | tags: modify_uplink_name |
| 85 | delegate_to: localhost |
| 86 | |
| 87 | - name: Modify a Uplink ports |
| 88 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 89 | hostname: "{{ hostname }}" |
| 90 | username: "{{ username }}" |
| 91 | password: "{{ password }}" |
| 92 | ca_path: "/path/to/ca_cert.pem" |
| 93 | state: "present" |
| 94 | fabric_name: "fabric1" |
| 95 | name: "uplink1" |
| 96 | description: "uplink ports modified" |
| 97 | primary_switch_service_tag: "ABC1234" |
| 98 | primary_switch_ports: |
| 99 | - ethernet1/1/6 |
| 100 | - ethernet1/1/7 |
| 101 | secondary_switch_service_tag: "XYZ1234" |
| 102 | secondary_switch_ports: |
| 103 | - ethernet1/1/9 |
| 104 | - ethernet1/1/10 |
| 105 | tags: modify_ports |
| 106 | delegate_to: localhost |
| 107 | |
| 108 | - name: Modify Uplink networks |
| 109 | dellemc.openmanage.ome_smart_fabric_uplink: |
| 110 | hostname: "{{ hostname }}" |
| 111 | username: "{{ username }}" |
| 112 | password: "{{ password }}" |
| 113 | ca_path: "/path/to/ca_cert.pem" |
| 114 | state: "present" |
| 115 | fabric_name: "fabric1" |
| 116 | name: "create1" |
| 117 | description: "uplink networks modified" |
| 118 | tagged_networks: |
| 119 | - vlan4 |
| 120 | tags: modify_networks |
| 121 | delegate_to: localhost |