A group may define one or more parameters through an additional argument of the def-group node with the total number of parameters:
def-group GroupA 2 { sd { (section) Service { (set) PIDFile "/run/${0}-pid" (set) ExecStartPre "/usr/bin/pre-${1}" } } }
Parameters can be accessed in string values or dependency arguments through ${0}, ${1}, ..., ${N-1} specifiers, which are replaced with their respective values when the unit is instantiated. In the previous example, loading GroupA with arguments "P1" and P2 will set the value of PIDFile field to /run/P1-pid and ExecStartPre field to /usr/bin/pre-P2. You cannot apply these specifiers to field names.
Additionally, the special specifier ${$} expands into a literal $.
Arguments are provided through a child args node:
def-group GroupB { pull { GroupA { args "pidname" "exec-sh" } } } def-group GroupC 1 { pull { GroupA { args "${0}-A" "${0}-B" } } }