summaryrefslogtreecommitdiffstats
path: root/ansible/rancher_kubernetes.yml
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-03-17 18:06:33 +0200
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-03-20 18:51:16 +0200
commitc580efee7cf133d479fdc4b736ebfeab09d2f246 (patch)
tree3d4a5746768b58bd05e58397411e4d8921d989a1 /ansible/rancher_kubernetes.yml
parentdbc6a7202dc89264a2857e12c625fb2328584a1e (diff)
Improve rancher role testability
Move functionality from playbook to rancher role. Introduce defaults for holding default values in rancher role. Other small changes noticed while testing rancher role with molecule. Issue-ID: OOM-1729 Change-Id: I83befa9f0964c67e209d3def76bafd2a61c1ef33 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/rancher_kubernetes.yml')
-rw-r--r--ansible/rancher_kubernetes.yml32
1 files changed, 12 insertions, 20 deletions
diff --git a/ansible/rancher_kubernetes.yml b/ansible/rancher_kubernetes.yml
index 196f1fc2..e44f18d3 100644
--- a/ansible/rancher_kubernetes.yml
+++ b/ansible/rancher_kubernetes.yml
@@ -1,31 +1,23 @@
---
-- name: Install binaries for controlling deployment
+- name: Deploy rancher server and create k8s env
hosts: infrastructure
roles:
+ - role: rancher
+ vars:
+ mode: server
- kubectl
- helm
-- name: Deploy rancher server and create k8s env
- hosts: infrastructure
- roles:
- - rancher
- vars:
- rancher_role: server
-
-- name: Deploy rancher agents
+- name: Deploy rancher agents for kube nodes
hosts: kubernetes
roles:
- - rancher
- vars:
- rancher_role: agent
+ - role: rancher
+ vars:
+ mode: agent
- name: Wait for Kubernetes environment to be healthy
hosts: infrastructure
- tasks:
- - name: Check cluster health
- uri:
- url: "{{ rancher_server_url }}/v2-beta/projects/{{ k8s_env_id }}"
- register: env_info
- retries: 30
- delay: 15
- until: "env_info.json.healthState == 'healthy'"
+ roles:
+ - role: rancher
+ vars:
+ mode: health \ No newline at end of file