summaryrefslogtreecommitdiffstats
path: root/ansible/roles/rancher
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-06-05 17:23:03 +0200
committerMichal Zegan <m.zegan@samsung.com>2019-06-05 17:23:03 +0200
commit88935caf1c0ef81928bdbfdc256842aa0c17d38a (patch)
tree16008d88e0205b781b7c6896913b768e7278edf7 /ansible/roles/rancher
parenta102564231d69771e67f7e516fb6bc23cf9d0ce0 (diff)
Use cluster_ip for rancher server url
This commit changes rancher role to use the cluster_ip when constructing rancher server url. This is a prerequisite to playbook level rancher tests. Change-Id: Id3eff260fe9d158aa8ab39494446ff7d6ad7ec6c Issue-ID: OOM-1906 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles/rancher')
-rw-r--r--ansible/roles/rancher/defaults/main.yml2
-rw-r--r--ansible/roles/rancher/molecule/default/playbook.yml1
2 files changed, 1 insertions, 2 deletions
diff --git a/ansible/roles/rancher/defaults/main.yml b/ansible/roles/rancher/defaults/main.yml
index e4e12d23..8a37574a 100644
--- a/ansible/roles/rancher/defaults/main.yml
+++ b/ansible/roles/rancher/defaults/main.yml
@@ -1,5 +1,5 @@
---
-rancher_server_url: "http://{{ hostvars[groups.infrastructure.0].ansible_host }}:8080"
+rancher_server_url: "http://{{ hostvars[groups.infrastructure.0].cluster_ip }}:8080"
rancher_remove_other_env: true
rancher_redeploy_k8s_env: true
rancher_cluster_health_state: healthy
diff --git a/ansible/roles/rancher/molecule/default/playbook.yml b/ansible/roles/rancher/molecule/default/playbook.yml
index e4a7151e..436f2ff4 100644
--- a/ansible/roles/rancher/molecule/default/playbook.yml
+++ b/ansible/roles/rancher/molecule/default/playbook.yml
@@ -6,7 +6,6 @@
- role: rancher
vars:
mode: server
- rancher_server_url: "http://{{ cluster_ip }}:8080"
- name: Converge rancher agent
hosts: kubernetes