Merge "Add base download script"
diff --git a/ansible/group_vars/infrastructure.yml b/ansible/group_vars/infrastructure.yml
index 66a00b5..c685e77 100755
--- a/ansible/group_vars/infrastructure.yml
+++ b/ansible/group_vars/infrastructure.yml
@@ -3,8 +3,6 @@
 simulated_hosts:
   git:
     - gerrit.onap.org
-    - git.rancher.io
-    - github.com
   http:
     - git.onap.org
     - nexus.onap.org
diff --git a/ansible/roles/application/defaults/main.yml b/ansible/roles/application/defaults/main.yml
index 84fffec..2ae668a 100644
--- a/ansible/roles/application/defaults/main.yml
+++ b/ansible/roles/application/defaults/main.yml
@@ -11,3 +11,5 @@
 app_skip_helm_override: false
 app_helm_override_role: application-override
 app_helm_override_file: "{{ app_data_path }}/override.yaml"
+helm_overide_files:
+  - "{{ app_helm_override_file }}"
diff --git a/ansible/roles/application/tasks/install.yml b/ansible/roles/application/tasks/install.yml
index bdf6e51..003631d 100644
--- a/ansible/roles/application/tasks/install.yml
+++ b/ansible/roles/application/tasks/install.yml
@@ -71,7 +71,7 @@
           {{ app_helm_release_name }}
           {{ helm_repository_name }}/{{ app_helm_chart_name }}
           --namespace {{ app_kubernetes_namespace }}
-          {{ '' if app_skip_helm_override else '-f ' + app_helm_override_file }}
+          {% if not app_skip_helm_override %} {% for arg in helm_overide_files %} {{ '-f ' + arg }} {% endfor %} {% endif %}
           {% for arg in helm_extra_install_options %} {{ arg.opt }} {% endfor %}
   changed_when: true  # when executed its a changed type of action
   register: helm_install
diff --git a/ansible/roles/nfs/molecule/default/molecule.yml b/ansible/roles/nfs/molecule/default/molecule.yml
index 7bacf3c..a8ca6a3 100644
--- a/ansible/roles/nfs/molecule/default/molecule.yml
+++ b/ansible/roles/nfs/molecule/default/molecule.yml
@@ -19,7 +19,7 @@
       - name: nfs-net
     volumes:
       - /sys/fs/cgroup:/sys/fs/cgroup:ro
-      - ${HOME}/data:/dockerdata-nfs:rw
+      - /dockerdata-nfs
 
   - name: kubernetes-node-2
     image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
diff --git a/ansible/test/play-resources/molecule/default/cleanup.yml b/ansible/test/play-resources/molecule/default/cleanup.yml
deleted file mode 100644
index e0c0b62..0000000
--- a/ansible/test/play-resources/molecule/default/cleanup.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- name: Cleanup data from instance (doing it from hosts requires root access).
-  hosts: resources
-  gather_facts: false
-  ignore_unreachable: true
-  pre_tasks:
-    - name: Find files and dirs to delete
-      find:
-        paths: /data/  # Only deleting content not dir itself as we get "Device or resource busy" error as it's mounted to container doing the deletion
-        patterns: "*"
-        recurse: true
-        file_type: any
-      register: files_to_delete
-    - name: Make file/dir path list
-      set_fact:
-        to_delete_paths: "{{ to_delete_paths | default([]) + [item.path] }}"
-      loop: "{{ files_to_delete.files }}"
-      when: files_to_delete.files is defined
-  roles:
-    - role: cleanup-directories
-      vars:
-        directories_files_list_to_remove: "{{ to_delete_paths }}"
-      when: to_delete_paths is defined
diff --git a/ansible/test/play-resources/molecule/nfs/molecule.yml b/ansible/test/play-resources/molecule/nfs/molecule.yml
index ffaabb0..9cff6b8 100644
--- a/ansible/test/play-resources/molecule/nfs/molecule.yml
+++ b/ansible/test/play-resources/molecule/nfs/molecule.yml
@@ -13,7 +13,7 @@
     override_command: false
     volumes:
       - /sys/fs/cgroup:/sys/fs/cgroup:ro
-      - ${HOME}/data:/data:rw  # mount fs from host to get nfs exportfs task working
+      - /data
     groups:
       - resources
     networks:
diff --git a/ansible/test/roles/cleanup-containers/tasks/main.yml b/ansible/test/roles/cleanup-containers/tasks/main.yml
deleted file mode 100644
index 3a800c9..0000000
--- a/ansible/test/roles/cleanup-containers/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: Remove containers
-  docker_container:
-    name: "{{ item }}"
-    state: absent
-  loop: "{{ container_list }}"
diff --git a/ansible/test/roles/cleanup-directories/tasks/main.yml b/ansible/test/roles/cleanup-directories/tasks/main.yml
deleted file mode 100644
index 8e79ea0..0000000
--- a/ansible/test/roles/cleanup-directories/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- name: Remove directories/files
-  file:
-    path: "{{ item }}"
-    state: absent
-  become: true
-  loop: "{{ directories_files_list_to_remove }}"
diff --git a/ansible/test/roles/cleanup-rancher/tasks/main.yml b/ansible/test/roles/cleanup-rancher/tasks/main.yml
deleted file mode 100644
index 21b0298..0000000
--- a/ansible/test/roles/cleanup-rancher/tasks/main.yml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# Remove containers spawned by Rancher Agent
-- name: Get list of containers spawned by Rancher Agent
-  docker_list_containers:
-    label_name: "{{ item.label }}"
-    label_value: "{{ item.value }}"
-  loop: "{{ container_list_by_label }}"
-  register: docker_list_containers_var
-
-- name: set fact # save a list of containers found by previous task to orphaned_containers var
-  set_fact: orphaned_containers="{{ orphaned_containers|default([]) + item.containers }}"
-  loop: "{{ docker_list_containers_var.results }}"
-
-- name: Remove orphaned containers
-  docker_container:
-    name: "{{ item }}"
-    state: absent
-  loop: "{{ orphaned_containers }}"
diff --git a/build/fetch_and_patch_charts.sh b/build/fetch_and_patch_charts.sh
index 79d7a01..22d45e6 100755
--- a/build/fetch_and_patch_charts.sh
+++ b/build/fetch_and_patch_charts.sh
@@ -54,7 +54,7 @@
 PATCH_FILE=$(realpath "${3}")
 
 echo -e "${_G}[Step $((CURR++))/${TOTAL} cloning repo with charts to be patched]${C_}"
-git clone "${1}" "${4}"
+git clone --recurse-submodules "${1}" "${4}"
 
 echo -e "${_G}[Step $((CURR++))/${TOTAL} setting working dir to ${4}]${C_}"
 pushd "${4}"