[Puppet Users] Re: where is ssh_known_hosts file generated by sshkey ?

jcbollinger
Wed, 11 Jul 2012 12:44:54 -0000

On Tuesday, July 10, 2012 7:00:27 PM UTC-5, Clay wrote:
>
> Hi ,
> I was testing  puppet exported resources as in
> http://docs.puppetlabs.com/guides/exported_resources.html and I had this
> test class (code is from another post).
>
> class ssh_known_hosts{
>         case $sshrsakey {
>                 '''': { alert("No sshrsakey found for
$fqdn") }
>                 default: {
>
>                   @@sshkey { $fqdn:
>                         ensure         => present,
>                         host_aliases   => [$hostname, $ipaddress],
>                         key            => $sshrsakey,
>                         type           => rsa,
>                   }
>                 }
>           }
>     Sshkey <<||>>
> }
>
> I ran it from clients,
>
> host1:/etc/puppet # puppet agent --test --environment dev
> info: Caching catalog for host1.domain.com
> info: Applying configuration version ''1341963662''
> ...
>
> notice: /Stage[main]/Ssh_known_hosts/Sshkey[host1.domain.com]/ensure:
> created
> notice: Finished catalog run in 0.56 seconds
>
> it shows the entry created,  but where is the file on the puppet master
> server ?  I checked /etc/ssh_known_hosts ( I created a empty one) , but
> it''s still empty.
>

According to the docs
(http://docs.puppetlabs.com/references/latest/type.html#sshkey), the Sshkey
resource manages /etc/ssh/ssh_known_hosts.


John

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit