diff options
Diffstat (limited to 'ansible')
7 files changed, 16 insertions, 13 deletions
diff --git a/ansible/roles/application/tasks/transfer-helm-charts.yml b/ansible/roles/application/tasks/transfer-helm-charts.yml index 5e4240b6..56c95cc4 100644 --- a/ansible/roles/application/tasks/transfer-helm-charts.yml +++ b/ansible/roles/application/tasks/transfer-helm-charts.yml @@ -3,9 +3,12 @@ - name: Distribute helm charts to infra node block: - name: Archive helm charts - archive: - path: "{{ app_helm_charts_install_directory }}/*" - dest: "{{ app_helm_charts_install_directory }}.tgz" + command: tar -cvzf {{ app_helm_charts_install_directory }}.tgz -C {{ app_helm_charts_install_directory }} . + args: + warn: false + tags: + - skip_ansible_lint # Prevent '[303] tar used in place of unarchive module' + changed_when: false # for idempotency delegate_to: localhost - name: Create helm charts dir on infra file: diff --git a/ansible/roles/nginx/defaults/main.yml b/ansible/roles/nginx/defaults/main.yml index 8bf44197..c2f1e05c 100644 --- a/ansible/roles/nginx/defaults/main.yml +++ b/ansible/roles/nginx/defaults/main.yml @@ -16,7 +16,7 @@ nginx: - "{{ app_data_path }}/certs:/etc/nginx/certs:ro" - "{{ app_data_path }}/git-repo:/srv/git:rw" - "{{ app_data_path }}/http:/srv/http:rw" - - "{{ app_data_path }}/pkg/rhel:/srv/http/repo.infra-server/rhel:rw" + - "{{ app_data_path }}/pkg/rpm:/srv/http/repo.infra-server/rpm:rw" - "{{ app_data_path }}/pkg/ubuntu/xenial:/srv/http/repo.infra-server/ubuntu/xenial:rw" - /var/log/nginx:/var/log/nginx:rw # Default rule for tarball naming translation diff --git a/ansible/roles/package-repository/defaults/main.yml b/ansible/roles/package-repository/defaults/main.yml index 678b6bd4..0557eda3 100644 --- a/ansible/roles/package-repository/defaults/main.yml +++ b/ansible/roles/package-repository/defaults/main.yml @@ -3,6 +3,6 @@ package_repositories: - name: "{{ app_name }}" file: "{{ app_name | lower }}" description: "{{ app_name | upper }} offline repository" - baseurl: "{{ 'http://repo.infra-server/rhel' if 'infrastructure' not in group_names else 'file://' + app_data_path + '/pkg/rhel' }}" + baseurl: "{{ 'http://repo.infra-server/rpm' if 'infrastructure' not in group_names else 'file://' + app_data_path + '/pkg/rpm' }}" gpgcheck: false enabled: true diff --git a/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py b/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py index 63588e26..9fb1a4f9 100644 --- a/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py +++ b/ansible/roles/package-repository/molecule/default/tests/test_infrastructure-server.py @@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_onap_repo(host): fc = host.file('/etc/yum.repos.d/moleculetestapp.repo').content_string expected_content = """[moleculetestapp] -baseurl = file:///opt/moleculetestapp/pkg/rhel +baseurl = file:///opt/moleculetestapp/pkg/rpm enabled = 1 gpgcheck = 0 name = MOLECULETESTAPP offline repository""" diff --git a/ansible/roles/package-repository/molecule/default/tests/test_kubernetes-node-1.py b/ansible/roles/package-repository/molecule/default/tests/test_kubernetes-node-1.py index eab7d065..fda85e8d 100644 --- a/ansible/roles/package-repository/molecule/default/tests/test_kubernetes-node-1.py +++ b/ansible/roles/package-repository/molecule/default/tests/test_kubernetes-node-1.py @@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_onap_repo(host): fc = host.file('/etc/yum.repos.d/moleculetestapp.repo').content_string expected_content = """[moleculetestapp] -baseurl = http://repo.infra-server/rhel +baseurl = http://repo.infra-server/rpm enabled = 1 gpgcheck = 0 name = MOLECULETESTAPP offline repository""" diff --git a/ansible/test/roles/prepare-package-repository/tasks/main.yml b/ansible/test/roles/prepare-package-repository/tasks/main.yml index 66f81d6d..983e9766 100644 --- a/ansible/test/roles/prepare-package-repository/tasks/main.yml +++ b/ansible/test/roles/prepare-package-repository/tasks/main.yml @@ -12,15 +12,15 @@ name: createrepo state: present -- name: "Ensure {{ rhel_pkg_dir }} exists" +- name: "Ensure {{ pkg_dir }} exists" file: - path: "{{ rhel_pkg_dir }}" + path: "{{ pkg_dir }}" state: directory - name: Download rpm packages - command: "yumdownloader --destdir={{ rhel_pkg_dir }} --resolve {{ packages | join(' ') }}" + command: "yumdownloader --destdir={{ pkg_dir }} --resolve {{ packages | join(' ') }}" - name: Index repository - command: "createrepo {{ rhel_pkg_dir }}" + command: "createrepo {{ pkg_dir }}" args: - creates: "{{ rhel_pkg_dir }}/repodata" + creates: "{{ pkg_dir }}/repodata" diff --git a/ansible/test/roles/prepare-package-repository/vars/main.yml b/ansible/test/roles/prepare-package-repository/vars/main.yml index 80944284..195ad0f1 100644 --- a/ansible/test/roles/prepare-package-repository/vars/main.yml +++ b/ansible/test/roles/prepare-package-repository/vars/main.yml @@ -1,5 +1,5 @@ --- -rhel_pkg_dir: "{{ app_data_path }}/pkg/rhel" +pkg_dir: "{{ app_data_path }}/pkg/rpm" packages: - "docker-ce-18.09.5" - container-selinux |