From c27244f72d8a10e2dfe523cdb5d14095048117db Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:22 -0400 Subject: [PATCH] Move netmask to separate config part 2 --- roles/pvc/tasks/common/add_cluster_ips.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/pvc/tasks/common/add_cluster_ips.yml b/roles/pvc/tasks/common/add_cluster_ips.yml index b649e68..ac08817 100644 --- a/roles/pvc/tasks/common/add_cluster_ips.yml +++ b/roles/pvc/tasks/common/add_cluster_ips.yml @@ -20,10 +20,14 @@ command: ip link set brcluster up ignore_errors: yes +- 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 + - 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 + command: ip address add {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %} dev brcluster 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 }} + 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 }} ignore_errors: yes