summaryrefslogtreecommitdiffstats
path: root/ansible/roles/rke/molecule/default
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/rke/molecule/default')
l---------ansible/roles/rke/molecule/default/group_vars1
-rw-r--r--ansible/roles/rke/molecule/default/molecule.yml21
-rw-r--r--ansible/roles/rke/molecule/default/playbook.yml7
-rw-r--r--ansible/roles/rke/molecule/default/tests/test_infrastructure.py2
4 files changed, 9 insertions, 22 deletions
diff --git a/ansible/roles/rke/molecule/default/group_vars b/ansible/roles/rke/molecule/default/group_vars
new file mode 120000
index 00000000..e04e088f
--- /dev/null
+++ b/ansible/roles/rke/molecule/default/group_vars
@@ -0,0 +1 @@
+../../../../group_vars/ \ No newline at end of file
diff --git a/ansible/roles/rke/molecule/default/molecule.yml b/ansible/roles/rke/molecule/default/molecule.yml
index 6ae613a9..3078c115 100644
--- a/ansible/roles/rke/molecule/default/molecule.yml
+++ b/ansible/roles/rke/molecule/default/molecule.yml
@@ -44,32 +44,11 @@ platforms:
- name: rke
purge_networks: true
- - name: kubernetes-node-2
- image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
- pre_build_image: true
- privileged: true
- override_command: false
- restart_policy: unless-stopped
- env:
- container: docker
- volumes:
- - /var/lib/kubelet
- - /var/lib/docker
- groups:
- - kubernetes
- - kubernetes-node
- networks:
- - name: rke
- purge_networks: true
-
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../../test/roles
ANSIBLE_LIBRARY: ../../../../library
- inventory:
- links:
- group_vars: ../../../../group_vars
options:
e: "app_data_path=/opt/onap"
lint:
diff --git a/ansible/roles/rke/molecule/default/playbook.yml b/ansible/roles/rke/molecule/default/playbook.yml
index 33345ed9..8db7aef5 100644
--- a/ansible/roles/rke/molecule/default/playbook.yml
+++ b/ansible/roles/rke/molecule/default/playbook.yml
@@ -6,6 +6,13 @@
set_fact:
cluster_ip: "{{ ansible_default_ipv4.address }}"
+- name: Configure etcd (RKE)
+ hosts: kubernetes-etcd
+ roles:
+ - role: rke
+ vars:
+ mode: etcd
+
- name: Configure kubernetes cluster (RKE)
hosts: infrastructure
roles:
diff --git a/ansible/roles/rke/molecule/default/tests/test_infrastructure.py b/ansible/roles/rke/molecule/default/tests/test_infrastructure.py
index 9ba11d6e..731f38bf 100644
--- a/ansible/roles/rke/molecule/default/tests/test_infrastructure.py
+++ b/ansible/roles/rke/molecule/default/tests/test_infrastructure.py
@@ -52,5 +52,5 @@ def test_pods_ready(host):
'metadata']['ownerReferences'][0]['kind'] == 'Job':
continue
assert host.run(
- 'kubectl wait --timeout=120s --for=condition=' + condition + ' -n ' +
+ 'kubectl wait --timeout=240s --for=condition=' + condition + ' -n ' +
namespace + ' pods/' + podname).rc == 0