Browse Source

Merge "Adding network_cli connection type for nxos accessports"

Zuul 3 months ago
parent
commit
e93d544d62

+ 6
- 0
etc/ansible/roles/openstack-ml2/providers/nxos/update_access_port.yaml View File

@@ -6,6 +6,7 @@
6 6
       - "show interface {{ port_name }} | json"
7 7
       - "show running-config"
8 8
   register: output
9
+  connection: network_cli
9 10
 
10 11
 - name: "nxos: set port facts"
11 12
   set_fact:
@@ -17,6 +18,7 @@
17 18
     - name: "nxos: reset interface to defaults"
18 19
       nxos_config:
19 20
         lines: "default interface {{ port_name }}"
21
+      connection: network_cli
20 22
 
21 23
     - name: "nxos: build port configuration"
22 24
       nxos_config:
@@ -27,6 +29,7 @@
27 29
           - "no shutdown"
28 30
         parents: ["interface {{ port_name }}"]
29 31
         running_config: "{{ output.stdout[2] }}"
32
+      connection: network_cli
30 33
   when: switchport.switchport == 'Disabled'
31 34
 
32 35
 - name: "nxos: port is configured as switchport"
@@ -36,6 +39,7 @@
36 39
         lines: "switchport mode access"
37 40
         parents: ["interface {{ port_name }}"]
38 41
       when: switchport.oper_mode != 'access'
42
+      connection: network_cli
39 43
 
40 44
     - name: "nxos: configure port settings"
41 45
       nxos_config:
@@ -44,10 +48,12 @@
44 48
           - "switchport access vlan {{ _vlan_id }}"
45 49
         parents: ["interface {{ port_name }}"]
46 50
         running_config: "{{ output.stdout[2] }}"
51
+      connection: network_cli
47 52
 
48 53
     - name: "nxos: administratively enable the port"
49 54
       nxos_config:
50 55
         lines: "no shutdown"
51 56
         parents: ["interface {{ port_name }}"]
52 57
       when: interface.admin_state == 'down'
58
+      connection: network_cli
53 59
   when: switchport.switchport == 'Enabled'

Loading…
Cancel
Save