Playbook #6

/home/zuul/src/opendev.org/opendev/system-config/playbooks/service-gitea-lb.yaml

Report Status CLI Date Duration Controller User Versions Hosts Plays Tasks Results Files Records
18 Jul 2025 20:47:59 +0000 00:01:10.54 bridge99.opendev.org root Ansible 2.15.13 ara 1.7.2 (client), 1.7.2 (server) Python 3.10.12 1 1 68 66 19 0

File: /home/zuul/src/opendev.org/opendev/system-config/playbooks/roles/haproxy/handlers/hup_haproxy.yaml

# This is necessary because podman kill -s HUP doesn't currently work on
# Ubuntu Noble. They appear tohave fixed this for other common signals (see
# https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2040483 ) but not
# for HUP. To work around this we use kill directly against the container
# process.
#
# Note that we need the first docker-compose ps here as the container name
# is different between docker-compose and docker compose.
- name: Get haproxy container ID
  command: docker-compose ps -q haproxy
  args:
    chdir: /etc/haproxy-docker/
  register: docker_ps

- name: Get haproxy container pid
  command: "{{ cmd_str }} {{ docker_ps.stdout }}"
  vars:
    cmd_str: !unsafe "docker inspect --format '{{ .State.Pid }}'"
  register: docker_inspect

- name: Send HUP to haproxy
  command: kill -s HUP {{ docker_inspect.stdout }}