diff options
Diffstat (limited to '')
-rw-r--r-- | manifests/worker_key.pp | 12 |
1 files changed, 11 insertions, 1 deletions
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}", } } |