Question

I am getting the message:

Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class git at /tmp/vagrant-puppet-1/manifests/site.pp:15 on node vagrant-ubuntu-precise-64.wp.comcast.net

Probably the best idea is to see this in action. I have created a GitHub repo of the exact manifest I am using. It is here: https://github.com/jamorat/puppet-example

The manifests and git module are there. If you have Vagrant, this can be vagrant up and you will see the error for yourself. Would be cool to either receive an answer here and/or also as a commit (for which credit would still be given here for answer.)

Thank you so much!

Was it helpful?

Solution

You need to configure vagrant with the puppet module path. On a side note, you would also usually keep the manifest and module folder in the same folder, instead of modules inside manifests.

OTHER TIPS

This:

class{ git:
svn => 'installed',
gui => 'installed',
}

is telling puppet to create a resource based on the class named git that has 2 parameters: svn and gui. Such a class declaration doesn't exist anywhere in what you've posted. If it were, it would look something like:

class git ($svn, $gui) {

  package {'svn':
    ensure => $svn,
  }

  # Whatever 'gui' is, making package b/c use of "installed"
  package {'gui':
    ensure => $gui,
  }
}

Alternative is to declare a class and include it using the "include" directive.

Recommend a good reading of Language: Classes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top