diff options
author | 2019-04-04 08:22:08 +0300 | |
---|---|---|
committer | 2019-04-17 09:30:59 +0300 | |
commit | bb3bef83ca562b9aadc288b3ec46264d73ec73ac (patch) | |
tree | 269f5624b39b14cfe249099df11f962147967d0e /ansible/roles/rancher/molecule/default/playbook.yml | |
parent | cceed25e6c773c18e479e246ddeadebc82870f70 (diff) |
Molecule tests for rancher role
Issue-ID: OOM-1775
Change-Id: I6ea11db932cd77e03909e4c72acc4b92a544eb4b
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/roles/rancher/molecule/default/playbook.yml')
-rw-r--r-- | ansible/roles/rancher/molecule/default/playbook.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ansible/roles/rancher/molecule/default/playbook.yml b/ansible/roles/rancher/molecule/default/playbook.yml new file mode 100644 index 00000000..e0ef086c --- /dev/null +++ b/ansible/roles/rancher/molecule/default/playbook.yml @@ -0,0 +1,28 @@ +--- +- name: Converge rancher master + hosts: infrastructure + roles: + - prepare-common # molecule specific role needed here to populate cluster_ip + - role: rancher + vars: + mode: server + rancher_server_url: "http://{{ cluster_ip }}:8080" + +- name: Converge rancher agent + hosts: kubernetes + roles: + - role: rancher + vars: + mode: agent + +- name: Wait for Kubernetes environment to be healthy + hosts: infrastructure + roles: + - role: rancher + vars: + mode: health + rancher_server_url: "http://{{ cluster_ip }}:8080" + # Do not get rancher cluster healthy in this env (to be checked), + # but it's enough in molecule test to verify we get this unhealthy response + rancher_cluster_health_state: unhealthy + rancher_cluster_health_check_retries: 40 |