Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

548 B
Raw Blame
define kandra::ssh_keys(
  $keys = true,
) {
  $user = $name
  if $keys == true {
    $keypath = "prod/ssh/keys/${user}"
  } elsif $keys.is_a(Array) {
    $keypath = join($keys.map |$k| {"prod/ssh/keys/${k}"}, ' ')
  } 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 --check ${user} ${keypath}",
  }
}