pvc-ansible/roles/pvc/tasks/common/add_cluster_ips.yml

30 lines
1015 B
YAML
Raw Normal View History

2023-09-01 15:42:19 -04:00
---
2023-09-01 15:42:21 -04:00
- name: bring up upstream interface
command: ifup {{ pvc_upstream_device }}
- name: bring up cluster interface
command: ifup {{ pvc_cluster_device }}
- name: brindg up storage interface
command: ifup {{ pvc_storage_device }}
- name: create cluster bridge interface
command: brctl addbr brcluster
ignore_errors: yes
- name: add underlying interface to bridge
command: brctl addif brcluster {{ pvc_cluster_device }}
ignore_errors: yes
- name: set brcluster up
command: ip link set brcluster up
ignore_errors: yes
2023-09-01 15:42:19 -04:00
- name: add IP addresses to cluster interfaces
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ node.cluster_cidr }}{% endfor %} dev brcluster
2023-09-01 15:42:19 -04:00
ignore_errors: yes
- name: add IP addresses to storage interfaces
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ node.storage_cidr }}{% endfor %} dev {{ pvc_storage_device }}
2023-09-01 15:42:19 -04:00
ignore_errors: yes