summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-05 14:45:47 +0000
committerGerrit Code Review <review@openstack.org>2018-10-05 14:45:47 +0000
commit393bc35d72033480bd6a70ff2ad4f3191e6f5ee1 (patch)
treebf431094664d457e98e3defff24dc323b1433b6b
parent2dbcc2a6d99c4c150bcbd1b459cd38134c5550cd (diff)
parentb68bb4c6dfad74e9640e511a226457126dbc459d (diff)
Merge "Updating the eos role"
-rw-r--r--etc/ansible/roles/openstack-ml2/providers/eos/create_network.yaml3
-rw-r--r--etc/ansible/roles/openstack-ml2/providers/eos/delete_network.yaml3
-rw-r--r--etc/ansible/roles/openstack-ml2/providers/eos/delete_port.yaml9
-rw-r--r--etc/ansible/roles/openstack-ml2/providers/eos/update_port.yaml9
4 files changed, 22 insertions, 2 deletions
diff --git a/etc/ansible/roles/openstack-ml2/providers/eos/create_network.yaml b/etc/ansible/roles/openstack-ml2/providers/eos/create_network.yaml
index 959fcde..54bf1fd 100644
--- a/etc/ansible/roles/openstack-ml2/providers/eos/create_network.yaml
+++ b/etc/ansible/roles/openstack-ml2/providers/eos/create_network.yaml
@@ -6,4 +6,5 @@
6 parents: 6 parents:
7 - "vlan {{ ml2_segmentation_id }}" 7 - "vlan {{ ml2_segmentation_id }}"
8 connection: network_cli 8 connection: network_cli
9 9 become: True
10 become_method: 'enable'
diff --git a/etc/ansible/roles/openstack-ml2/providers/eos/delete_network.yaml b/etc/ansible/roles/openstack-ml2/providers/eos/delete_network.yaml
index f23f948..516ccae 100644
--- a/etc/ansible/roles/openstack-ml2/providers/eos/delete_network.yaml
+++ b/etc/ansible/roles/openstack-ml2/providers/eos/delete_network.yaml
@@ -3,4 +3,5 @@
3 eos_config: 3 eos_config:
4 lines: "no vlan {{ ml2_segmentation_id }}" 4 lines: "no vlan {{ ml2_segmentation_id }}"
5 connection: network_cli 5 connection: network_cli
6 6 become: True
7 become_method: 'enable'
diff --git a/etc/ansible/roles/openstack-ml2/providers/eos/delete_port.yaml b/etc/ansible/roles/openstack-ml2/providers/eos/delete_port.yaml
index fab5c1a..d87052e 100644
--- a/etc/ansible/roles/openstack-ml2/providers/eos/delete_port.yaml
+++ b/etc/ansible/roles/openstack-ml2/providers/eos/delete_port.yaml
@@ -3,6 +3,9 @@
3 eos_command: 3 eos_command:
4 commands: "show interfaces | json" 4 commands: "show interfaces | json"
5 register: output 5 register: output
6 connection: network_cli
7 become: True
8 become_method: 'enable'
6 9
7- name: "eos: verify port exists" 10- name: "eos: verify port exists"
8 fail: 11 fail:
@@ -12,8 +15,14 @@
12- name: "eos: remove port configuration" 15- name: "eos: remove port configuration"
13 eos_config: 16 eos_config:
14 lines: "default interface {{ ml2_port_name }}" 17 lines: "default interface {{ ml2_port_name }}"
18 connection: network_cli
19 become: True
20 become_method: 'enable'
15 21
16- name: "eos: administratively disable the port" 22- name: "eos: administratively disable the port"
17 eos_config: 23 eos_config:
18 lines: "shutdown" 24 lines: "shutdown"
19 parents: ["interface {{ ml2_port_name }}"] 25 parents: ["interface {{ ml2_port_name }}"]
26 connection: network_cli
27 become: True
28 become_method: 'enable'
diff --git a/etc/ansible/roles/openstack-ml2/providers/eos/update_port.yaml b/etc/ansible/roles/openstack-ml2/providers/eos/update_port.yaml
index 546c349..604b2f9 100644
--- a/etc/ansible/roles/openstack-ml2/providers/eos/update_port.yaml
+++ b/etc/ansible/roles/openstack-ml2/providers/eos/update_port.yaml
@@ -6,6 +6,9 @@
6 - "show interface {{ ml2_port_name }} | json" 6 - "show interface {{ ml2_port_name }} | json"
7 - "show running-config" 7 - "show running-config"
8 register: output 8 register: output
9 connection: network_cli
10 become: True
11 become_method: 'enable'
9 12
10- name: "eos: set port facts" 13- name: "eos: set port facts"
11 set_fact: 14 set_fact:
@@ -29,6 +32,9 @@
29 - "interface {{ ml2_port_name }}" 32 - "interface {{ ml2_port_name }}"
30 running_config: "{{ output.stdout[2] }}" 33 running_config: "{{ output.stdout[2] }}"
31 when: not switchport.enabled 34 when: not switchport.enabled
35 connection: network_cli
36 become: True
37 become_method: 'enable'
32 38
33- name: "eos: port is configured as switchport" 39- name: "eos: port is configured as switchport"
34 block: 40 block:
@@ -52,3 +58,6 @@
52 parents: ["interface {{ ml2_port_name }}"] 58 parents: ["interface {{ ml2_port_name }}"]
53 when: interface.interfaceStatus == 'disabled' 59 when: interface.interfaceStatus == 'disabled'
54 when: switchport.enabled 60 when: switchport.enabled
61 connection: network_cli
62 become: True
63 become_method: 'enable'