Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to apply catalog: Resource type 'Ssh_authorized_key' was not found #457

Open
slima opened this issue Aug 8, 2023 · 5 comments

Comments

@slima
Copy link

slima commented Aug 8, 2023

Describe the Bug

When include class accounts and the operating system is Debian 12 bookworm
I get:
Error: Failed to apply catalog: Resource type 'Ssh_authorized_key' was not found

Expected Behavior

working

Steps to Reproduce

Environment

  • puppetlabs-accounts (v8.1.0)
  • Debian 12.1

Describe the Bug

When include class accounts and the operating system is Debian 12 bookworm
I get:
Error: Failed to apply catalog: Resource type 'Ssh_authorized_key' was not found

Expected Behavior

working

Steps to Reproduce

classes:

  • accounts

accounts::user_defaults:
groups: [ 'users' ]
managehome: true
system: false

accounts::user_list:
slima:
groups: [ 'adm', 'sudo' ]
sshkeys:
- &kamil_sshkey 'ssh-ed25519 key'

Environment

  • puppetlabs-accounts (v8.1.0)
  • Debian 12.1

Additional Context

On Debian 11 working.

@kenyon
Copy link
Contributor

kenyon commented Aug 8, 2023

This is probably because you are using the Debian distribution-packaged puppet-agent package, which doesn't include the https://github.com/puppetlabs/puppetlabs-sshkeys_core/ module, like the Puppet-packaged "all in one" puppet-agent package.

@slima
Copy link
Author

slima commented Aug 8, 2023

Yeah, but on https://apt.puppet.com/ there is no bookworm yet.

@kenyon
Copy link
Contributor

kenyon commented Aug 8, 2023

Right, so you need to add sshkeys_core to your Puppetfile.

@nerdalertdk
Copy link

I could you some help here, i'm getting the same error

root@test-debian12:~# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Failed to apply catalog: Resource type 'Ssh_authorized_key' was not found
root@test-debian12:~# puppet module list
/usr/share/puppet/modules
├── puppetlabs-concat (v7.3.1)
├── puppetlabs-firewall (v3.4.0)
├── puppetlabs-host_core (v1.1.0)
├── puppetlabs-sshkeys_core (v2.3.0)
└── puppetlabs-stdlib (v8.5.0)
root@test-debian12:~#
ssh_authorized_key { 'ssh key':
  name     => 'root@server1', 
  ensure   => present,
  key	 => $backup_ssh_key,
  user     => 'root',
}

@jrevillas
Copy link

@nerdalertdk have you checked if your Puppet server knows about this package? You can run the same puppet module list command followed by puppet module install puppetlabs-sshkeys_core if its not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants