summaryrefslogtreecommitdiffstats
path: root/roles/ands_network
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-11 19:56:38 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-11 19:56:38 +0100
commitf3c41dd13a0a86382b80d564e9de0d6b06fb1dbf (patch)
tree3522ce77203da92bb2b6f7cfa2b0999bf6cc132c /roles/ands_network
parent6bc3a3ac71e11fb6459df715536fec373c123a97 (diff)
downloadands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.gz
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.bz2
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.xz
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.zip
Various fixes before moving to hardware installation
Diffstat (limited to 'roles/ands_network')
-rw-r--r--roles/ands_network/tasks/common.yml21
-rw-r--r--roles/ands_network/tasks/ganesha.yml12
-rw-r--r--roles/ands_network/tasks/install_post.yml2
-rw-r--r--roles/ands_network/tasks/maintain.yml6
4 files changed, 24 insertions, 17 deletions
diff --git a/roles/ands_network/tasks/common.yml b/roles/ands_network/tasks/common.yml
index 384029f..f2fda00 100644
--- a/roles/ands_network/tasks/common.yml
+++ b/roles/ands_network/tasks/common.yml
@@ -22,27 +22,18 @@
- nodes
- new_nodes
-- name: Configure all storage ips in /etc/hosts
- lineinfile: dest="/etc/hosts" line="{{ ip }} {{ hostname }}" regexp="{{ hostname }}" state="present"
- when:
- - hostvars[item]['ands_storage_network'] | default(ands_none) != ands_none
- - hostvars[item]['ands_facts_configured'] is defined
- vars:
- ip: "{{ hostvars[item]['ands_storage_ip'] }}"
- hostname: "{{ hostvars[item]['ands_hostname_storage'] }}"
- with_inventory_hostnames:
- - storage_nodes
- - new_storage_nodes
-
-
- name: Provision /etc/hosts to ensure that all masters servers are accessing Master API on loopback device
lineinfile: dest="/etc/hosts" line="127.0.0.1 {{ openshift_master_cluster_hostname }}" regexp=".*{{ openshift_master_cluster_hostname }}$" state="present"
when: ('masters' in group_names or 'new_masters' in group_names)
register: result
-- name: Provision /etc/hosts to ensure that all masters servers are accessing Master API on loopback device
+- name: Provision /etc/hosts with load-balance IP on non master servers
lineinfile: dest="/etc/hosts" line="{{ ands_inner_lb_ip }} {{ openshift_master_cluster_hostname }}" regexp=".*{{ openshift_master_cluster_hostname }}$" state="present"
- when: (result | skipped) and (ands_inner_lb | default(false))
+ when: (result | skipped) and (ands_use_inner_lb | default(false))
+
+- name: Provision inner load-balancer hostname in /etc/hosts
+ lineinfile: dest="/etc/hosts" line="{{ ands_inner_lb_ip }} {{ ands_inner_lb_hostname }} {{ ands_inner_lb_fqdn }}" regexp=".*{{ ands_inner_lb_fqdn }}$" state="present"
+ when: openshift_master_cluster_hostname != ands_inner_lb_fqdn
- name: Register openshift_dns_ip in /etc/hosts
lineinfile: dest="/etc/hosts" line="{{ openshift_dns_ip }} openshift_dns_ip" regexp="openshift_dns_ip$" state="present"
diff --git a/roles/ands_network/tasks/ganesha.yml b/roles/ands_network/tasks/ganesha.yml
new file mode 100644
index 0000000..0f77ca8
--- /dev/null
+++ b/roles/ands_network/tasks/ganesha.yml
@@ -0,0 +1,12 @@
+- name: Configure all storage ips in /etc/hosts
+ lineinfile: dest="/etc/hosts" line="{{ ip }} {{ hostname }}" regexp="{{ hostname }}" state="present"
+ when:
+ - hostvars[item]['ands_storage_network'] | default(ands_none) != ands_none
+ - hostvars[item]['ands_facts_configured'] is defined
+ vars:
+ ip: "{{ hostvars[item]['ands_storage_ip'] }}"
+ hostname: "{{ hostvars[item]['ands_hostname_storage'] }}"
+ with_inventory_hostnames:
+ - storage_nodes
+ - new_storage_nodes
+
diff --git a/roles/ands_network/tasks/install_post.yml b/roles/ands_network/tasks/install_post.yml
index 0bfef34..3f1e57c 100644
--- a/roles/ands_network/tasks/install_post.yml
+++ b/roles/ands_network/tasks/install_post.yml
@@ -6,4 +6,4 @@
lineinfile: dest="/etc/hosts" line="{{ ands_inner_lb_ip | default('') }} {{ openshift_master_cluster_hostname }}" regexp=".*{{ openshift_master_cluster_hostname }}$" state="{{ state }}"
when: ('masters' not in group_names and 'new_masters' not in group_names)
vars:
- state: "{{ ands_inner_lb | default(false) | ternary('present', 'absent') }}"
+ state: "{{ ands_use_inner_lb | default(false) | ternary('present', 'absent') }}"
diff --git a/roles/ands_network/tasks/maintain.yml b/roles/ands_network/tasks/maintain.yml
index a7af597..6fba5f2 100644
--- a/roles/ands_network/tasks/maintain.yml
+++ b/roles/ands_network/tasks/maintain.yml
@@ -6,4 +6,8 @@
lineinfile: dest="/etc/hosts" line="{{ ands_inner_lb_ip | default('') }} {{ openshift_master_cluster_hostname }}" regexp=".*{{ openshift_master_cluster_hostname }}$" state="{{ state }}"
when: ('masters' not in group_names and 'new_masters' not in group_names)
vars:
- state: "{{ ands_inner_lb | default(false) | ternary('present', 'absent') }}"
+ state: "{{ ands_use_inner_lb | default(false) | ternary('present', 'absent') }}"
+
+- name: Provision inner load-balancer hostname in /etc/hosts
+ lineinfile: dest="/etc/hosts" line="{{ ands_inner_lb_ip }} {{ ands_inner_lb_hostname }} {{ ands_inner_lb_fqdn }}" regexp=".*{{ ands_inner_lb_fqdn }}$" state="present"
+ when: openshift_master_cluster_hostname != ands_inner_lb_fqdn