Ask Your Question

Resource failed with error ArgumentError: Invalid resource type sudo

asked 2016-01-15 14:47:16 -0500

SPQRInc gravatar image

updated 2016-01-15 14:48:01 -0500


I've got another problem:

I would like to use the apt-dater module.

To do so I included the following:

    class { 'apt_dater': customer => 'Test', ssh_key_type => 'ssh-rsa', ssh_key => template('site/'); }

But if I do puppet agent -t I'm getting this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type sudo::directive at /etc/puppet/modules/apt_dater/manifests/host.pp:56 on node pp-test Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

The content of the line is:

  sudo::directive { 'apt-dater':
    content => "${apt_dater::host_user} ALL=NOPASSWD: ${apt_dater::host_update_cmd}\n";

What can I do here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-15 19:04:41 -0500

lavaman gravatar image

updated 2016-01-15 19:05:53 -0500

If you look at the module on github:

You'll see the code was pulled from example42/puppet-apt. Example42 has their own ecosystem of puppet modules that depend heavily on one another. Example42/puppet-sudo is a dependency for this code. It contains the missing resource type sudo::directive referenced in the error.

Also, if you look at the fixtures file for puppet-sudo, you'll see it has several more example42 dependencies:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-15 14:47:16 -0500

Seen: 391 times

Last updated: Jan 15 '16