cleanup
This commit is contained in:
parent
a1cffe8b3e
commit
5e7650fb6e
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Restart agent
|
- name: Restart agent
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: "woodpecker-agent-{{ __woodpecker_agent_name }}"
|
name: "woodpecker-agent-{{ __woodpecker_agent_name }}"
|
||||||
state: "{{ woodpecker_agent_service_started | ternary('restarted', 'stopped', 'restarted') }}"
|
state: "{{ woodpecker_agent_service_started | ternary('restarted', 'stopped', 'restarted') }}"
|
||||||
daemon_reload: True
|
daemon_reload: True
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Register agent metadata
|
- name: Register agent metadata
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
__woodpecker_agent_name: "{{ inst.name | regex_replace('[^a-z0-9]+', '-', ignorecase=True) }}"
|
__woodpecker_agent_name: "{{ inst.name | regex_replace('[^a-z0-9]+', '-', ignorecase=True) }}"
|
||||||
__woodpecker_agent_volumes: "{{ inst.volumes | default(woodpecker_agent_volumes) }}"
|
__woodpecker_agent_volumes: "{{ inst.volumes | default(woodpecker_agent_volumes) }}"
|
||||||
__woodpecker_agent_cap_add: "{{ inst.cap_add | default(woodpecker_agent_cap_add) }}"
|
__woodpecker_agent_cap_add: "{{ inst.cap_add | default(woodpecker_agent_cap_add) }}"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks:
|
- ansible.builtin.include_tasks:
|
||||||
file: instance.yml
|
file: instance.yml
|
||||||
loop: "{{ woodpecker_agent_instances }}"
|
loop: "{{ woodpecker_agent_instances }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
|
Loading…
Reference in New Issue
Block a user