fix: require instance name and add default instance
This commit is contained in:
parent
4a498eaa1b
commit
7625b8a6f5
@ -2,7 +2,6 @@
|
|||||||
woodpecker_agent_image: "docker.io/woodpeckerci/woodpecker-agent:latest"
|
woodpecker_agent_image: "docker.io/woodpeckerci/woodpecker-agent:latest"
|
||||||
|
|
||||||
woodpecker_agent_service_started: True
|
woodpecker_agent_service_started: True
|
||||||
woodpecker_agent_name: agent-1
|
|
||||||
|
|
||||||
# @var woodpecker_agent_volumes:description: Define required docker volumes.
|
# @var woodpecker_agent_volumes:description: Define required docker volumes.
|
||||||
woodpecker_agent_volumes:
|
woodpecker_agent_volumes:
|
||||||
@ -44,9 +43,5 @@ woodpecker_agent_filter_labels: []
|
|||||||
woodpecker_agent_env: []
|
woodpecker_agent_env: []
|
||||||
|
|
||||||
# @var woodpecker_agent_instances:description: List of multiple agents to deploy.
|
# @var woodpecker_agent_instances:description: List of multiple agents to deploy.
|
||||||
# @var woodpecker_agent_instances:example: >
|
woodpecker_agent_instances:
|
||||||
# woodpecker_agent_instances:
|
- name: agent-1
|
||||||
# - name: agent-1
|
|
||||||
# filter_labels: []
|
|
||||||
# @end
|
|
||||||
woodpecker_agent_instances: []
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Register agent metadata
|
- name: Register agent metadata
|
||||||
set_fact:
|
set_fact:
|
||||||
__woodpecker_agent_name: "{{ inst.name | default(woodpecker_agent_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) }}"
|
||||||
__woodpecker_agent_cap_drop: "{{ inst.cap_drop | default(woodpecker_agent_cap_drop) }}"
|
__woodpecker_agent_cap_drop: "{{ inst.cap_drop | default(woodpecker_agent_cap_drop) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user