container: Support cap_add

This commit is contained in:
uumas
2026-03-12 00:17:18 +02:00
parent 447d4e59ad
commit 5a3bb96fc2
3 changed files with 9 additions and 0 deletions

View File

@@ -14,3 +14,4 @@ container_auto_start: true
container_auto_update: true
container_requires: []
container_wants: []
container_add_capabilities: []

View File

@@ -173,6 +173,13 @@ argument_specs:
required: false
default: {}
container_add_capabilities:
description: List of capabilities to add to the container
type: list
required: false
default: []
elements: str
container_requires:
description: >
List of systemd units (like other containers) this one depends on.

View File

@@ -54,6 +54,7 @@
publish: "{{ container_publish_ports }}"
secrets: "{{ _container_secrets }}"
env: "{{ container_env }}"
cap_add: "{{ container_add_capabilities }}"
label: "{{ _container_labels if _container_labels | length > 0 else omit }}"
state: quadlet
quadlet_file_mode: "0600"