2023-09-01 15:42:19 -04:00
|
|
|
---
|
2023-09-01 15:42:22 -04:00
|
|
|
- name: bring up interfaces interface
|
|
|
|
command: ifup {{ item }}
|
|
|
|
with_items:
|
|
|
|
- "{{ pvc_cluster_device }}"
|
|
|
|
- "{{ pvc_storage_device }}"
|
|
|
|
- "{{ pvc_upstream_device }}"
|
|
|
|
|
|
|
|
- name: create bridge interfacec
|
|
|
|
command: brctl addbr {{ item }}
|
2023-09-01 15:42:20 -04:00
|
|
|
ignore_errors: yes
|
2023-09-01 15:42:22 -04:00
|
|
|
with_items:
|
|
|
|
- "brcluster"
|
|
|
|
- "brstorage"
|
|
|
|
- "brupstream"
|
2023-09-01 15:42:20 -04:00
|
|
|
|
2023-09-01 15:42:22 -04:00
|
|
|
- name: add underlying interfaces to bridges
|
|
|
|
command: brctl addif {{ item.bridge }} {{ item.device }}
|
2023-09-01 15:42:20 -04:00
|
|
|
ignore_errors: yes
|
2023-09-01 15:42:22 -04:00
|
|
|
with_items:
|
|
|
|
- { "bridge": "brcluster", "device": "{{ pvc_cluster_device }}" }
|
|
|
|
- { "bridge": "brstorage", "device": "{{ pvc_storage_device }}" }
|
|
|
|
- { "bridge": "brupstream", "device": "{{ pvc_upstream_device }}" }
|
2023-09-01 15:42:20 -04:00
|
|
|
|
2023-09-01 15:42:22 -04:00
|
|
|
- name: set bridge interfaces up
|
|
|
|
command: ip link set {{ item }} up
|
2023-09-01 15:42:20 -04:00
|
|
|
ignore_errors: yes
|
2023-09-01 15:42:22 -04:00
|
|
|
with_items:
|
|
|
|
- "brcluster"
|
|
|
|
- "brstorage"
|
|
|
|
- "brupstream"
|
2023-09-01 15:42:20 -04:00
|
|
|
|
2023-09-01 15:42:22 -04:00
|
|
|
- name: add IP addresses to upstream bridge
|
|
|
|
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ pvc_upstream_netmask }}{% endfor %} dev brupstream
|
2023-09-01 15:42:22 -04:00
|
|
|
ignore_errors: yes
|
|
|
|
|
2023-09-01 15:42:22 -04:00
|
|
|
- name: add IP addresses to cluster bridge
|
2023-09-01 15:42:22 -04:00
|
|
|
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %} dev brcluster
|
2023-09-01 15:42:19 -04:00
|
|
|
ignore_errors: yes
|
|
|
|
|
2023-09-01 15:42:22 -04: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
|
2023-09-01 15:42:19 -04:00
|
|
|
ignore_errors: yes
|