Ask Your Question

Revision history [back]

Solution: ensure that the key is only exported if the fact is available. Can be absent when running puppet the first time during installation.

  # Now add the key, if we've got one
  if $::sshrsakey {
    @@sshkey{ $::fqdn:
      ensure       => present,
      type         => ssh-rsa,
      key          => $::sshrsakey,
      host_aliases => [$::hostname, $::ipaddress],
    }
  } else {
    warning("no sshrsakey on ${::fqdn}")
  }