diff options
author | Samuli Silvius <s.silvius@partner.samsung.com> | 2019-06-05 14:55:01 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-05 14:55:01 +0000 |
commit | 70e8bfada11bfaf866936af28523613b21ce3d59 (patch) | |
tree | 16317c11e37900be0c8969e8decf313b73c941bf /ansible/test/roles | |
parent | d3cb6429d6d3cdcd625906e702140a51fc146847 (diff) | |
parent | dd60657a1d436f99832791e796e0858f97542905 (diff) |
Merge "Remove the prepare-docker test role"
Diffstat (limited to 'ansible/test/roles')
6 files changed, 0 insertions, 84 deletions
diff --git a/ansible/test/roles/prepare-docker/tasks/docker-packages.yml b/ansible/test/roles/prepare-docker/tasks/docker-packages.yml deleted file mode 100644 index 8f55c5ce..00000000 --- a/ansible/test/roles/prepare-docker/tasks/docker-packages.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -- name: Download docker related packages - command: yumdownloader --destdir="{{ rpm_dir }}" "{{ docker_ce_rpm }}" - args: - creates: "{{ rpm_dir }}/{{ docker_ce_rpm }}" - -- name: Install docker related packages - yum: - name: "{{ rpm_dir + '/' + docker_ce_rpm + '.rpm'}}" diff --git a/ansible/test/roles/prepare-docker/tasks/docker-socket-override.yml b/ansible/test/roles/prepare-docker/tasks/docker-socket-override.yml deleted file mode 100644 index 0cabadf4..00000000 --- a/ansible/test/roles/prepare-docker/tasks/docker-socket-override.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Create docker.socket systemd dir for override - file: - path: /etc/systemd/system/docker.socket.d - state: directory - -- name: Fake dockerd dependent docker.socket service not to actually listen the docker socket as dockerd is not used in container only docker client - copy: - content: | - [Socket] - ListenStream= - ListenStream=/tmp/fake - dest: /etc/systemd/system/docker.socket.d/override.conf diff --git a/ansible/test/roles/prepare-docker/tasks/enable-repos.yml b/ansible/test/roles/prepare-docker/tasks/enable-repos.yml deleted file mode 100644 index 204bf03d..00000000 --- a/ansible/test/roles/prepare-docker/tasks/enable-repos.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Enable docker repos back for Molecule testing purposes - copy: - remote_src: yes - src: "{{ item }}" - dest: "{{ (item | splitext)[0] }}" - loop: "{{ docker_needed_repos }}" - -- name: Disable offline repo for molecule testing purposes - lineinfile: - path: "{{ offline_repo_file }}" - regexp: 'enabled = 1' - line: 'enabled = 0' diff --git a/ansible/test/roles/prepare-docker/tasks/main.yml b/ansible/test/roles/prepare-docker/tasks/main.yml deleted file mode 100644 index e7d87061..00000000 --- a/ansible/test/roles/prepare-docker/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Check repositories - stat: - path: "{{ item }}" - loop: "{{ docker_needed_repos + [offline_repo_file] }}" - register: repos - -- name: Set fact for offline repos created - set_fact: - offline_repo_created: "{{ (repos.results | map(attribute='stat.exists') | list) is all }}" - -- debug: - var: offline_repo_created - -- name: Enable repos back (if package-repository role already setup offline onap repo) for molecule testing purposes to install docker - include_tasks: enable-repos.yml - when: offline_repo_created - -- name: Prepare docker repos normally - include_tasks: prepare-docker-repos.yml - when: not offline_repo_created diff --git a/ansible/test/roles/prepare-docker/tasks/prepare-docker-repos.yml b/ansible/test/roles/prepare-docker/tasks/prepare-docker-repos.yml deleted file mode 100644 index 01ea72c3..00000000 --- a/ansible/test/roles/prepare-docker/tasks/prepare-docker-repos.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Install Docker-CE repo - yum_repository: - name: docker-ce - description: Docker-ce YUM repo - baseurl: https://download.docker.com/linux/centos/7/x86_64/stable/ - gpgcheck: true - gpgkey: https://download.docker.com/linux/centos/gpg - -- name: Create rpm dir - file: - path: "{{ rpm_dir }}" - state: directory - -- name: Handle docker-ce packages - import_tasks: docker-packages.yml - -- name: Fake dockerd on container - import_tasks: docker-socket-override.yml - when: ansible_env.container == 'docker' diff --git a/ansible/test/roles/prepare-docker/vars/main.yml b/ansible/test/roles/prepare-docker/vars/main.yml deleted file mode 100644 index bcd7f365..00000000 --- a/ansible/test/roles/prepare-docker/vars/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -docker_needed_repos: - - /etc/yum.repos.d/CentOS-Base.repo.disabled - - /etc/yum.repos.d/docker-ce.repo.disabled -offline_repo_file: /etc/yum.repos.d/onap.repo -rpm_dir: /root/rpm -docker_ce_rpm: docker-ce-18.09.5-3.el7.x86_64 |