fix: require instance name and add default instance
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-02-15 11:24:26 +01:00
parent 4a498eaa1b
commit 7625b8a6f5
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 3 additions and 8 deletions

View File

@ -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: []

View File

@ -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) }}"