ansible-collection-woodpecker/roles/woodpecker/handlers/main.yml
Nis Wechselberg 3cbefaafa2
Initial version of woodpecker collection
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
2024-12-20 22:52:29 +01:00

52 lines
1.2 KiB
YAML

---
- name: 'Reload woodpecker services'
become: true
ansible.builtin.service:
daemon_reload: true
- name: 'Restart woodpecker network'
become: true
ansible.builtin.service:
name: '{{ woodpecker_podman_network }}-network'
state: 'restarted'
notify:
- 'Restart woodpecker-server'
- 'Restart woodpecker-agent'
- name: 'Restart woodpecker volumes'
become: true
ansible.builtin.service:
name: '{{ item }}'
state: 'restarted'
loop:
- '{{ woodpecker_server_data_volume }}-volume'
- '{{ woodpecker_agent_config_volume }}-volume'
notify:
- 'Restart woodpecker-server'
- 'Restart woodpecker-agent'
- name: 'Restart woodpecker images'
become: true
ansible.builtin.service:
name: ''
state: 'restarted'
loop:
- 'woodpecker-server-image'
- 'woodpecker-agent-image'
notify:
- 'Restart woodpecker-server'
- 'Restart woodpecker-agent'
- name: 'Restart woodpecker-server'
become: true
ansible.builtin.service:
name: 'woodpecker-server'
state: 'restarted'
- name: 'Restart woodpecker-agent'
become: true
ansible.builtin.service:
name: 'woodpecker-agent'
state: 'restarted'