[CORD-1650]
Refactor interface/bridge handling
Change-Id: I83fd9eb3e8440ba277b7b4d1ed41cb18347b6916
diff --git a/roles/interface-config/tasks/main.yml b/roles/interface-config/tasks/main.yml
index 44efe78..f1d1253 100644
--- a/roles/interface-config/tasks/main.yml
+++ b/roles/interface-config/tasks/main.yml
@@ -87,16 +87,32 @@
owner: root
group: root
mode: 0644
- register: compute_fabric_config
+ register: fabric_net_config
-- name: Bring up fabric interfaces, if reconfigured
- when: compute_fabric_config.changed
+- name: Bring up fabricbridge on head node
+ when: "'head' in group_names and fabric_net_config.changed"
+ command: "ifup fabricbridge"
+ tags:
+ - skip_ansible_lint # needs to be run before next steps
+
+- name: Bring up fabricbridge:0 on head node if using VSG addresspool
+ when: "'head' in group_names and fabric_net_config.changed and use_addresspool_vsg"
+ command: "ifup fabricbridge:0"
+ tags:
+ - skip_ansible_lint # no interface manip module in ansible
+
+- name: Bring up fabricbridge:1 on head node if using PUBLIC addresspool
+ when: "'head' in group_names and fabric_net_config.changed and use_addresspool_vsg"
+ command: "ifup fabricbridge:1"
+ tags:
+ - skip_ansible_lint # no interface manip module in ansible
+
+- name: Bring up common fabric interfaces, if reconfigured
+ when: fabric_net_config.changed
command: "ifup {{ item }}"
with_flattened:
- - fabricbridge
- fabricbond
- "{{ fabric_net_interfaces }}"
- - vethfabric0
tags:
- skip_ansible_lint # needs to be run before next steps