2019-06-12 10:33:48 -04:00
|
|
|
---
|
2020-01-12 19:45:47 -05:00
|
|
|
- name: bring up interfaces interface
|
|
|
|
command: ifup {{ item }}
|
|
|
|
with_items:
|
|
|
|
- "{{ pvc_cluster_device }}"
|
|
|
|
- "{{ pvc_storage_device }}"
|
|
|
|
|
|
|
|
- name: create bridge interfacec
|
|
|
|
command: brctl addbr {{ item }}
|
2019-06-16 19:17:41 -04:00
|
|
|
ignore_errors: yes
|
2020-01-12 19:45:47 -05:00
|
|
|
with_items:
|
|
|
|
- "brcluster"
|
|
|
|
- "brstorage"
|
2019-06-16 19:17:41 -04:00
|
|
|
|
2020-01-12 19:45:47 -05:00
|
|
|
- name: add underlying interfaces to bridges
|
|
|
|
command: brctl addif {{ item.bridge }} {{ item.device }}
|
2019-06-16 19:17:41 -04:00
|
|
|
ignore_errors: yes
|
2020-01-12 19:45:47 -05:00
|
|
|
with_items:
|
|
|
|
- { "bridge": "brcluster", "device": "{{ pvc_cluster_device }}" }
|
|
|
|
- { "bridge": "brstorage", "device": "{{ pvc_storage_device }}" }
|
2019-06-16 19:17:41 -04:00
|
|
|
|
2020-01-12 19:45:47 -05:00
|
|
|
- name: set bridge interfaces up
|
|
|
|
command: ip link set {{ item }} up
|
2019-06-16 19:17:41 -04:00
|
|
|
ignore_errors: yes
|
2020-01-12 19:45:47 -05:00
|
|
|
with_items:
|
|
|
|
- "brcluster"
|
|
|
|
- "brstorage"
|
2019-12-24 14:16:20 -05:00
|
|
|
|
2020-01-12 19:45:47 -05:00
|
|
|
- name: add IP addresses to cluster bridge
|
2019-12-24 14:16:20 -05:00
|
|
|
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %} dev brcluster
|
2019-06-12 10:33:48 -04:00
|
|
|
ignore_errors: yes
|
|
|
|
|
2020-01-12 19:45:47 -05:00
|
|
|
- name: add IP addresses to storage bridge
|
|
|
|
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ pvc_storage_netmask }}{% endfor %} dev brstorage
|
2019-06-12 10:33:48 -04:00
|
|
|
ignore_errors: yes
|