Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/202731
Change subject: ssh::userkey: Allow a prefix to be specified for a key ...................................................................... ssh::userkey: Allow a prefix to be specified for a key Allow to specify a prefix for a managed key that if defined, will be prepended to the filename of the key allowing to populate specific purpose keys. Change-Id: I4c6292df03ebc3ac933226207f0e074775c8bbd3 --- M modules/ssh/manifests/userkey.pp 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/31/202731/1 diff --git a/modules/ssh/manifests/userkey.pp b/modules/ssh/manifests/userkey.pp index 43d90aa..ccf441c 100644 --- a/modules/ssh/manifests/userkey.pp +++ b/modules/ssh/manifests/userkey.pp @@ -23,6 +23,10 @@ # Path to file containing configuration directives. Undefined by # default. Mutually exclusive with 'content'. # +# [*prefix*] +# If defined, it will prepend the prefix string to the filename of the key +# path allowing to populate specific purpose keys. +# # === Examples # # ssh::userkey { 'john' @@ -34,6 +38,7 @@ define ssh::userkey( $ensure = present, $user = $title, + $prefix = undef, $source = undef, $content = undef, @@ -46,7 +51,13 @@ fail('"source" and "content" are mutually exclusive') } - file { "/etc/ssh/userkeys/${user}": + if $prefix { + $path = "/etc/ssh/userkeys/${prefix}-${user}" + } else { + $path = "/etc/ssh/userkeys/${user}" + } + + file { $path: ensure => $ensure, force => true, owner => 'root', -- To view, visit https://gerrit.wikimedia.org/r/202731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c6292df03ebc3ac933226207f0e074775c8bbd3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits