diff options
author | Michal Ptacek <m.ptacek@partner.samsung.com> | 2019-06-04 10:49:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-04 10:49:53 +0000 |
commit | df7d7cc1294c6ea1fcab2ed4ac2ee7c375b29651 (patch) | |
tree | b647fb0144ab0b6b79f15cd46a15bb75b691018a /ansible/test/roles | |
parent | 8636d184d6c07df9ef74941a0d4343d61b95c5d4 (diff) | |
parent | 1ec19b0598382aa45258ed630ee26cba4fb3a7e5 (diff) |
Merge "Add molecule tests for rke role"
Diffstat (limited to 'ansible/test/roles')
-rw-r--r-- | ansible/test/roles/prepare-rke/defaults/main.yml | 5 | ||||
-rw-r--r-- | ansible/test/roles/prepare-rke/tasks/all.yml | 6 | ||||
-rw-r--r-- | ansible/test/roles/prepare-rke/tasks/infra.yml | 16 | ||||
-rw-r--r-- | ansible/test/roles/prepare-rke/tasks/main.yml | 2 |
4 files changed, 29 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-rke/defaults/main.yml b/ansible/test/roles/prepare-rke/defaults/main.yml new file mode 100644 index 00000000..2cf85635 --- /dev/null +++ b/ansible/test/roles/prepare-rke/defaults/main.yml @@ -0,0 +1,5 @@ +--- +#The rke version. +rke_version: 0.2.0 +#The kubectl version. +kubectl_version: 1.13.5 diff --git a/ansible/test/roles/prepare-rke/tasks/all.yml b/ansible/test/roles/prepare-rke/tasks/all.yml new file mode 100644 index 00000000..d4b67c1f --- /dev/null +++ b/ansible/test/roles/prepare-rke/tasks/all.yml @@ -0,0 +1,6 @@ +#This is needed because login from non root is blocked by default. +- name: "Allow non root logins" + service: + name: systemd-user-sessions + state: started + diff --git a/ansible/test/roles/prepare-rke/tasks/infra.yml b/ansible/test/roles/prepare-rke/tasks/infra.yml new file mode 100644 index 00000000..55ab7f16 --- /dev/null +++ b/ansible/test/roles/prepare-rke/tasks/infra.yml @@ -0,0 +1,16 @@ +--- +- name: "Ensure {{ app_data_path }} exists" + file: + path: "{{ app_data_path }}/downloads" + state: directory + +- name: "Install rke-{{ rke_version }}" + get_url: + url: "https://github.com/rancher/rke/releases/download/v{{ rke_version }}/rke_linux-amd64" + dest: "{{ app_data_path }}/downloads/rke" + +- name: "Install kubectl-{{ kubectl_version }}" + get_url: + url: "https://storage.googleapis.com/kubernetes-release/release/v{{ kubectl_version }}/bin/linux/amd64/kubectl" + dest: "/usr/local/bin/kubectl" + mode: 0755 diff --git a/ansible/test/roles/prepare-rke/tasks/main.yml b/ansible/test/roles/prepare-rke/tasks/main.yml new file mode 100644 index 00000000..210c9b57 --- /dev/null +++ b/ansible/test/roles/prepare-rke/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include_tasks: "{{ mode }}.yml" |