CORD-433 Add virtual fabric to CiaB
Change-Id: I8fbea8c85f309a4c226951e0cde96a9b7394d6eb
diff --git a/ansible/roles/spineswitch/tasks/main.yml b/ansible/roles/spineswitch/tasks/main.yml
new file mode 100644
index 0000000..ea25a5a
--- /dev/null
+++ b/ansible/roles/spineswitch/tasks/main.yml
@@ -0,0 +1,24 @@
+- name: Ensure interface config files
+ template:
+ src: templates/ethX.cfg.j2
+ dest: /etc/network/interfaces.d/{{ item }}.cfg
+ with_items:
+ - eth2
+ - eth3
+
+- name: Ensure interfaces are up
+ command: ifup {{ item }}
+ with_items:
+ - eth2
+ - eth3
+ tags:
+ - skip_ansible_lint # running a sub job
+
+- name: Ensure fabric configuration
+ include: fabric.yml
+ when: fabric
+
+- name: Ensure bridge configuration
+ include: bridge.yml
+ when: not fabric
+