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.

kandra: Skip hostnames which are undef.

Alex Vandiverfa6f4cc03939
diff --git a/puppet/kandra/manifests/user_dotfiles.pp b/puppet/kandra/manifests/user_dotfiles.pp
index 064af19301e..a6a4708bae1 100644
--- a/puppet/kandra/manifests/user_dotfiles.pp
+++ b/puppet/kandra/manifests/user_dotfiles.pp
@@ -63,8 +63,10 @@ define kandra::user_dotfiles (
mode => '0644',
require => File["${homedir}/.ssh"],
}
- $known_hosts.each |String $hostname| {
- if $hostname == 'github.com' {
+ $known_hosts.each |Optional[String] $hostname| {
+ if $hostname == undef {
+ # pass
+ } elsif $hostname == 'github.com' {
$github_keys = file('kandra/github.keys')
exec { "${user} ssh known_hosts ${hostname}":
command => "echo '${github_keys}' >> ${homedir}/.ssh/known_hosts",