zulip/puppet/zulip_ops/manifests/ssh_keys.pp

16 lines
455 B
Puppet

define zulip_ops::ssh_keys(
$keys = true,
) {
$user = $name
if $keys == true {
$keypath = "prod/ssh/keys/${user}"
} else {
$keypath = "prod/ssh/keys/${keys}"
}
exec { "ssh_keys ${user}":
require => File['/usr/local/bin/install-ssh-keys'],
command => "/usr/local/bin/install-ssh-keys ${user} ${keypath}",
unless => "[ -f /usr/local/bin/install-ssh-keys ] && /usr/local/bin/install-ssh-keys ${user} ${keypath} check",
}
}