aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-06-20 15:29:13 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-06-20 15:29:13 +0200
commitfeec3bf8636fb956c4668c409e65fb72dc8880a9 (patch)
treef713ce88f4a92f81440acb825349e6c25a55f56a
parentfixes (diff)
downloadconcourse-feec3bf8636fb956c4668c409e65fb72dc8880a9.tar.gz
concourse-feec3bf8636fb956c4668c409e65fb72dc8880a9.tar.xz
fixes
-rw-r--r--manifests/worker_key.pp12
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}",
}
}