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

34 lines
1.2 KiB
YAML
Raw Normal View History

2019-06-12 10:33:48 -04:00
---
2019-07-08 14:40:02 -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
2019-12-24 14:16:20 -05:00
- name: add IP addresses to upstream interfaces
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ pvc_upstream_netmask }}{% endfor %} dev {{ pvc_upstream_device }}
ignore_errors: yes
2019-06-12 10:33:48 -04:00
- name: add IP addresses to cluster interfaces
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
- name: add IP addresses to storage interfaces
2019-12-24 14:16:20 -05:00
command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ pvc_storage_netmask }}{% endfor %} dev {{ pvc_storage_device }}
2019-06-12 10:33:48 -04:00
ignore_errors: yes