voxpupuli / puppet-augeasproviders_ssh

Augeas-based ssh types and providers for Puppet
Apache License 2.0
7 stars 32 forks source link

sshkey known host lens not found #19

Closed jamesj2 closed 9 years ago

jamesj2 commented 9 years ago

I'm unable to get sshkey to work. I see the there is a lens provided within the module's lib directory.. Is this supposed to be used/installed automatically? There is no known_hosts.aug in /usr/share/augeas/lenses/dist.

Error

Error: /Stage[main]/Profiles::Base/Profiles::Base::Modules::Stage1/Openssh-known-hosts/Sshkey[github.com]: Could not evaluate: Augeas didn't load /etc/ssh/ssh_known_hosts with Known_Hosts.lns:

Example

    sshkey { 'github.com':
        ensure => present,
        host_aliases => ['*.github.com'],
        type => 'ssh-rsa',
        key => '...',
    }

Running

CentOs 6.6 x64
ruby-augeas-0.4.1-3.el6.x86_64
augeas-1.0.0-7.el6_6.1.x86_64
augeas-libs-1.0.0-7.el6_6.1.x86_64
herculesteam-augeasproviders_ssh 2.4.0
nitzerstorm commented 9 years ago

I am having the same problem and I am wondering if this module should be using Authorized_Keys.lns based on this:

find /opt/puppet -name *aug | egrep -i "known|author"

/opt/puppet/share/augeas/lenses/dist/tests/test_authorized_keys.aug /opt/puppet/share/augeas/lenses/dist/authorized_keys.aug

jamesj2 commented 9 years ago

I removed augeasproviders_ssh\lib\puppet\provider\sshkey* to utilize puppet's builtin sshkey type and was able to get things working again.

raphink commented 9 years ago

@jamesj2 the Known_Hosts lens is from Augeas 1.3. One option could be to backport it and add it to your profiles module in lib/augeas/lenses.

@nitzerstorm sshkey manages host keys, not authorized keys.