--- - hosts: localhost roles: - setup-k8s-config - add-k8s-hosts - hosts: zuul-scheduler vars: config_ref: "{{ zuul.newrev | default('origin/master') }}" tasks: - name: "Update zuul tenant config" command: /usr/local/bin/generate-zuul-tenant-yaml.sh "{{ config_ref }}" - name: "Reconfigure the scheduler" command: zuul-scheduler smart-reconfigure - hosts: nodepool-launcher vars: config_ref: "{{ zuul.newrev | default('origin/master') }}" ansible_python_interpreter: /usr/bin/python3.11 tasks: - name: "Update nodepool-launcher config" command: /usr/local/bin/generate-config.sh "{{ config_ref }}" - hosts: nodepool-builder vars: config_ref: "{{ zuul.newrev | default('origin/master') }}" ansible_python_interpreter: /usr/bin/python3.11 tasks: - name: "Update nodepool-builder config" command: /usr/local/bin/generate-config.sh "{{ config_ref }}" environment: NODEPOOL_CONFIG_FILE: nodepool-builder.yaml # Handle code-search config-update tasks # The StatefulSet controller will restart the pod after the deletion # Ideally we should run a rollout restart but kubectl does not have that capability, or better, run the hound config update script in-place but hound does not support hot reload. - hosts: localhost tasks: - name: Check if hound-search pod is running command: kubectl get pod hound-search-0 register: houndsearch_pod_get ignore_errors: true - name: Force hound-search restart by deleting the pod command: kubectl delete pod hound-search-0 when: houndsearch_pod_get.rc == 0