The "Restart gitea-runner" handler was not guarded by docker_rootless_setup, causing failures in CI containers without a systemd user bus. Also add failed_when: false to all lifecycle side_effect.yml systemctl --user tasks. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
21 lines
587 B
YAML
21 lines
587 B
YAML
---
|
|
- name: Reload systemd
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
when:
|
|
- ansible_facts is defined
|
|
- ansible_facts['service_mgr'] | default('') == 'systemd'
|
|
- docker_rootless_setup
|
|
|
|
- name: Restart gitea-runner
|
|
ansible.builtin.command: systemctl --user restart gitea-runner
|
|
become: true
|
|
become_user: "{{ gitea_runner_service_user }}"
|
|
environment:
|
|
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
|
changed_when: true
|
|
when:
|
|
- ansible_facts is defined
|
|
- ansible_facts['service_mgr'] | default('') == 'systemd'
|
|
- docker_rootless_setup
|