From feec3bf8636fb956c4668c409e65fb72dc8880a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 20 Jun 2023 15:29:13 +0200 Subject: fixes --- manifests/worker_key.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'manifests/worker_key.pp') diff --git a/manifests/worker_key.pp b/manifests/worker_key.pp index be32a01..ffac96d 100644 --- a/manifests/worker_key.pp +++ b/manifests/worker_key.pp @@ -7,15 +7,25 @@ # # @param content # Complete content of the key, as it appears on disk. +# Mutually exclusive with source. +# @param source +# Place where the complete contents of the key can be found. +# Mutually exclusive with content. # @param cluster # Which cluster this key is part of. # @api private define concourse::worker_key ( String $cluster, - String $content, + Optional[String] $content = undef, + Optional[Stdlib::Absolutepath] $source = undef, ) { + if $content and $source { + fail('Content and source are mutually exclusive') + } + concat::fragment { $name: content => $content, + source => $source, target => "authorized_worker_keys - ${cluster}", } } -- cgit v1.2.3