diff --git a/roles/apply-custom-resources/tasks/main.yaml b/roles/apply-custom-resources/tasks/main.yaml index da66bbd2..bc93dde9 100644 --- a/roles/apply-custom-resources/tasks/main.yaml +++ b/roles/apply-custom-resources/tasks/main.yaml @@ -5,4 +5,4 @@ chdir: "{{ zuul.project.src_dir }}" - ansible.builtin.include_role: - name: "roles/health-check/check-sf-resource-ready" + name: "health-check/check-sf-resource-ready" diff --git a/roles/build-operator-assets/tasks/main.yaml b/roles/build-operator-assets/tasks/main.yaml index 8ca5758b..696b5afc 100644 --- a/roles/build-operator-assets/tasks/main.yaml +++ b/roles/build-operator-assets/tasks/main.yaml @@ -23,7 +23,7 @@ block: - name: Setup local registry ansible.builtin.include_role: - name: "roles/setup-local-registry" + name: "setup-local-registry" when: - build_bundle | default(true) diff --git a/roles/health-check/config-update-nodepool-builder/tasks/main.yaml b/roles/health-check/config-update-nodepool-builder/tasks/main.yaml index 8c805598..393c4966 100644 --- a/roles/health-check/config-update-nodepool-builder/tasks/main.yaml +++ b/roles/health-check/config-update-nodepool-builder/tasks/main.yaml @@ -28,7 +28,7 @@ - "git commit -m 'Add nodepool/nodepool-builder.yaml'" - ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" vars: ensure_config_check_failure: true @@ -127,7 +127,7 @@ - name: Update config repo change ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" - name: "Check that {{ nodepool_diskimage_name }} label exists in the destination file" ansible.builtin.shell: | diff --git a/roles/health-check/config-update-nodepool-launcher/tasks/main.yaml b/roles/health-check/config-update-nodepool-launcher/tasks/main.yaml index 854665a7..7dcc07e4 100644 --- a/roles/health-check/config-update-nodepool-launcher/tasks/main.yaml +++ b/roles/health-check/config-update-nodepool-launcher/tasks/main.yaml @@ -25,7 +25,7 @@ - "git commit -m 'Add nodepool/nodepool.yaml'" - ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" vars: ensure_config_check_failure: true @@ -118,7 +118,7 @@ - name: Update config repo change ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" - name: Get nodepool-launcher pod name ansible.builtin.shell: | diff --git a/roles/health-check/config-update-zuul/tasks/main.yaml b/roles/health-check/config-update-zuul/tasks/main.yaml index 2e3f4e77..30016fba 100644 --- a/roles/health-check/config-update-zuul/tasks/main.yaml +++ b/roles/health-check/config-update-zuul/tasks/main.yaml @@ -26,7 +26,7 @@ tenant_name: "ichiban-tenant-{{ random }}" - ansible.builtin.include_role: - name: "roles/create-gerrit-repository" + name: "create-gerrit-repository" # First attempt a negative test where we expect a failure - name: Set bad Zuul tenant config @@ -47,7 +47,7 @@ - "git commit -m 'Add {{ config_path }}/zuul/main.yaml'" - ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" vars: ensure_config_check_failure: true @@ -76,7 +76,7 @@ vars: check_zuul_console: true ansible.builtin.include_role: - name: "roles/health-check/config-repo-submit-change" + name: "health-check/config-repo-submit-change" - ansible.builtin.set_fact: zuul_config_update_build_log_url: "{{ (zuul_job_result.json | list)[0].log_url }}" @@ -84,7 +84,7 @@ - name: Check that Zuul has pushed the job console on the logserver ansible.builtin.include_role: - name: "roles/health-check/ensure-job-result-artifacts" + name: "health-check/ensure-job-result-artifacts" vars: log_url: "{{ zuul_config_update_build_log_url }}" diff --git a/roles/health-check/expand-volume/tasks/main.yaml b/roles/health-check/expand-volume/tasks/main.yaml index fcca22e4..bc7e849b 100644 --- a/roles/health-check/expand-volume/tasks/main.yaml +++ b/roles/health-check/expand-volume/tasks/main.yaml @@ -12,7 +12,7 @@ - name: Expand logserver volume ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: logserver: diff --git a/roles/health-check/scale-resources/tasks/scale.yaml b/roles/health-check/scale-resources/tasks/scale.yaml index c621dd0f..7753340a 100644 --- a/roles/health-check/scale-resources/tasks/scale.yaml +++ b/roles/health-check/scale-resources/tasks/scale.yaml @@ -6,7 +6,7 @@ - name: "Scale {{ operation }} on statefulset {{ service.name }}" ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: "{{ service['scale_' + operation + '_resources'] }}" diff --git a/roles/health-check/test-cert-manager-letsencrypt/tasks/main.yaml b/roles/health-check/test-cert-manager-letsencrypt/tasks/main.yaml index abb3ddaf..bbdad1b9 100644 --- a/roles/health-check/test-cert-manager-letsencrypt/tasks/main.yaml +++ b/roles/health-check/test-cert-manager-letsencrypt/tasks/main.yaml @@ -1,7 +1,7 @@ --- - name: Update SF CR to set Let's Encrypt ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: check_sf_resource_ready: false cr_spec: @@ -45,7 +45,7 @@ - name: Update SF CR to unset Let's Encrypt ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: letsEncrypt: diff --git a/roles/health-check/test-custom-route-certs/tasks/main.yaml b/roles/health-check/test-custom-route-certs/tasks/main.yaml index 08f29a43..fd19f816 100644 --- a/roles/health-check/test-custom-route-certs/tasks/main.yaml +++ b/roles/health-check/test-custom-route-certs/tasks/main.yaml @@ -71,7 +71,7 @@ ansible.builtin.include_tasks: add_ssl_secret.yaml - ansible.builtin.include_role: - name: "roles/health-check/check-sf-resource-ready" + name: "health-check/check-sf-resource-ready" - name: Check SSL for the route ansible.builtin.include_tasks: check_route.yaml diff --git a/roles/health-check/test-monitoring/tasks/main.yaml b/roles/health-check/test-monitoring/tasks/main.yaml index 924cb1e0..45d485a6 100644 --- a/roles/health-check/test-monitoring/tasks/main.yaml +++ b/roles/health-check/test-monitoring/tasks/main.yaml @@ -15,7 +15,7 @@ - name: Fetch defined Prometheus targets ansible.builtin.shell: curl -k https://{{ prometheus_host }}/api/v1/targets | jq '.data.activeTargets[] | select(.labels.container == "{{ item }}") | .health' register: target_health - failed_when: "\"up\" not in target_health.stdout" + failed_when: '"up" not in target_health.stdout' loop: - "zuul-web" - "zuul-executor" @@ -26,7 +26,7 @@ - name: Fetch defined alerts for logserver ansible.builtin.shell: curl -k https://{{ prometheus_host }}/api/v1/rules | jq '.data.groups[] | select(.name == "disk_default.rules") | .rules[] | select(.name == "{{ item }}") | .health' register: logserver_alert - failed_when: "\"ok\" not in logserver_alert.stdout" + failed_when: '"ok" not in logserver_alert.stdout' loop: - "OutOfDiskNow" - "OutOfDiskInThreeDays" @@ -66,7 +66,7 @@ - name: configure clouds.yaml in sfconfig.yaml ansible.builtin.lineinfile: path: "{{ zuul.project.src_dir }}/sfconfig.yaml" - regexp: '^ clouds_file:' + regexp: "^ clouds_file:" line: " clouds_file: /tmp/test-clouds.yaml" - name: Upload clouds secrets to nodepool @@ -76,26 +76,26 @@ - name: Wait for secrets to be updated ansible.builtin.include_role: - name: "roles/health-check/check-sf-resource-ready" + name: "health-check/check-sf-resource-ready" - name: Ensure statsd mapping config has custom mappings from clouds.yaml ansible.builtin.command: kubectl get configmap np-statsd-config-map -o jsonpath='{.data}' register: statsd_mappings - + - name: Ensure statsd mapping config has custom mappings from clouds.yaml fail: msg: "statsd mapping configuration has no reference to clouds config" when: ("nodepool.openstack.nimbus" not in statsd_mappings.stdout) or - ("nodepool.openstack.cumulus" not in statsd_mappings.stdout) or - ("nodepool.openstack.*.*.*.*" not in statsd_mappings.stdout) + ("nodepool.openstack.cumulus" not in statsd_mappings.stdout) or + ("nodepool.openstack.*.*.*.*" not in statsd_mappings.stdout) - name: Fetch OpenStack API alerts ansible.builtin.shell: curl -k https://{{ prometheus_host }}/api/v1/rules | jq '.data.groups[] | select(.name == "providersAPI_default.rules") | .rules[] | select(.name == "{{ item }}") | .health' register: logserver_alert - until: "\"ok\" in logserver_alert.stdout" + until: '"ok" in logserver_alert.stdout' loop: - "HighOpenStackAPIError5xxRate" - "HighOpenStackAPIError5xxRate_nimbus" - "HighOpenStackAPIError5xxRate_cumulus" retries: 6 - delay: 10 \ No newline at end of file + delay: 10 diff --git a/roles/health-check/validate-purgelogs/tasks/main.yaml b/roles/health-check/validate-purgelogs/tasks/main.yaml index 79dbcf97..50106390 100644 --- a/roles/health-check/validate-purgelogs/tasks/main.yaml +++ b/roles/health-check/validate-purgelogs/tasks/main.yaml @@ -1,6 +1,6 @@ - name: Change logserver/purgelogs loop delay ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: logserver: @@ -8,7 +8,7 @@ - name: Ensure job results exists in Logserver ansible.builtin.include_role: - name: "roles/health-check/ensure-job-result-artifacts" + name: "health-check/ensure-job-result-artifacts" vars: log_url: "{{ zuul_config_update_build_log_url }}" @@ -44,7 +44,7 @@ - name: Ensure job results do not exist in Logserver after purging ansible.builtin.include_role: - name: "roles/health-check/ensure-job-result-artifacts" + name: "health-check/ensure-job-result-artifacts" vars: log_url: "{{ zuul_config_update_build_log_url }}" status: 404 @@ -56,6 +56,6 @@ - name: Ensure logserver content restoring worked ansible.builtin.include_role: - name: "roles/health-check/ensure-job-result-artifacts" + name: "health-check/ensure-job-result-artifacts" vars: log_url: "{{ zuul_config_update_build_log_url }}" diff --git a/roles/health-check/zuul-authenticators/tasks/main.yaml b/roles/health-check/zuul-authenticators/tasks/main.yaml index 7c4cd113..7df27991 100644 --- a/roles/health-check/zuul-authenticators/tasks/main.yaml +++ b/roles/health-check/zuul-authenticators/tasks/main.yaml @@ -9,7 +9,7 @@ - name: Add the authenticator to spec ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: zuul: @@ -28,7 +28,7 @@ - name: Remove the test authenticator from the spec ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: zuul: diff --git a/roles/health-check/zuul-connections/tasks/main.yaml b/roles/health-check/zuul-connections/tasks/main.yaml index 1627632a..e9eb8a06 100644 --- a/roles/health-check/zuul-connections/tasks/main.yaml +++ b/roles/health-check/zuul-connections/tasks/main.yaml @@ -21,7 +21,7 @@ - name: Add a dummy Zuul Gerrit connection ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: zuul: @@ -43,7 +43,7 @@ - name: Delete the dummy Zuul Gerrit connection ansible.builtin.include_role: - name: "roles/update-custom-resource" + name: "update-custom-resource" vars: cr_spec: zuul: @@ -62,4 +62,3 @@ - "'dummy-github-conn' not in this.content" retries: "{{ retries }}" delay: "{{ delay }}" - diff --git a/roles/run-tests/tasks/main.yaml b/roles/run-tests/tasks/main.yaml index f7fbac68..babba2d0 100644 --- a/roles/run-tests/tasks/main.yaml +++ b/roles/run-tests/tasks/main.yaml @@ -4,7 +4,7 @@ - name: Iterate on preparation roles ansible.builtin.include_role: - name: "roles/utils/{{ role }}" + name: "utils/{{ role }}" loop: - manage-hosts - get-gerrit-admin-user-api-key @@ -14,7 +14,7 @@ - name: Iterate on tests ansible.builtin.include_role: - name: "roles/health-check/{{ role }}" + name: "health-check/{{ role }}" loop: - check-service-uri - zuul-connections @@ -37,7 +37,7 @@ - name: Check scaling ansible.builtin.include_role: - name: roles/health-check/scale-resources + name: health-check/scale-resources loop: - up - down diff --git a/roles/update-custom-resource/tasks/main.yaml b/roles/update-custom-resource/tasks/main.yaml index e22021bf..11db1113 100644 --- a/roles/update-custom-resource/tasks/main.yaml +++ b/roles/update-custom-resource/tasks/main.yaml @@ -11,5 +11,5 @@ spec: "{{ cr_spec }}" - ansible.builtin.include_role: - name: "roles/health-check/check-sf-resource-ready" + name: "health-check/check-sf-resource-ready" when: check_sf_resource_ready | default(true) diff --git a/roles/upgrade-operator/tasks/main.yaml b/roles/upgrade-operator/tasks/main.yaml index 4391619b..4c3e7f97 100644 --- a/roles/upgrade-operator/tasks/main.yaml +++ b/roles/upgrade-operator/tasks/main.yaml @@ -58,7 +58,7 @@ - name: Ensure operator expected version ready ansible.builtin.include_role: - name: roles/check-operator-version + name: check-operator-version vars: upgrade_version: "v{{ gen_bundle_version.stdout }}.0.0" @@ -68,6 +68,6 @@ # by the new version 'reconciledBy' field. - name: Wait for operand ready ansible.builtin.include_role: - name: roles/health-check/check-sf-resource-ready + name: health-check/check-sf-resource-ready vars: reconciledBy: "sf-operator.v{{ gen_bundle_version.stdout }}.0.0"