Issues creating a customer type/provider

22 views
Skip to first unread message

Simon Weald

unread,
Jul 28, 2016, 7:33:38 AM7/28/16
to Puppet Users
Hi guys

I'm extending our in-house package management system to include management of apt's GPG keys (we're a Debian shop). Ruby isn't my forte, but I've cooked up what I think is a decent working type and provider which I can extend further if the need arises. Currently during a run I'm getting an error 400 stating that one of my parameters isn't valid.

I've provided the relevant code here: https://gist.github.com/analbeard/8560005282856b9302145934730a77a0

and the run output I'm receiving is:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter keyid on Apt_key[9023A836357AF18193C2F0F8013F8A39FBC95654] at /etc/puppet/environments/development/modules/pkg_mgmnt/manifests/aptkey.pp:10 on node test.test.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


Can anyone shed any light as to why Puppet doesn't like the keyid parameter?

Martin Alfke

unread,
Jul 29, 2016, 2:57:07 AM7/29/16
to puppet...@googlegroups.com
Hi Simon,
Your puppet code is making use of the aptkey type.
The type which you created has the name repokey.
Puppet::Type.newtype(:repokey)

You should use the type repokey in you manifest.

>
>
> Can anyone shed any light as to why Puppet doesn't like the keyid parameter?
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9c700d3e-e9bf-49fd-a7fe-8d77271af9c3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Simon Weald

unread,
Jul 29, 2016, 5:49:38 AM7/29/16
to Puppet Users
Hi Martin

Thanks for pointing that out; rookie mistake! I spotted a few other issues which I've now tidied up and I'm happy to say that it now works perfectly.

Thanks for your help!
Reply all
Reply to author
Forward
0 new messages