voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
Apache License 2.0
142 stars 45 forks source link

"Unknown resource type" for some puppet built-in resources #260

Closed damonmaria closed 4 years ago

damonmaria commented 4 years ago

Hi, onceover works great for me in some circumstances but breaks on puppet built-in resource types such as cron and augeas. For example:

role::grading_processor: failed
  errors:
    Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'augeas'
      file: modules/ipmi/manifests/config.pp
      line: 12
      column: 3
      factsets: proc

I don't think I'm doing anything wrong but given how fundamental this is other ppl would be striking the same issue. Any hints to figure out why these fail?

onceover: 3.15.1 ruby: 2.6.3

dylanratcliffe commented 4 years ago

Quite a while ago (I think Puppet 5) a bunch of the types were removed from Puppet and moved to _core modules. The puppet-agent package still ships with them which it why it hasn't broken but people should be using the forge modules instead. https://forge.puppet.com/modules?utf-8=%E2%9C%93&page_size=25&sort=rank&q=_core

Since onceover pulls Puppet directly from the Ruby gem it doesn't contain the other stuff and you'll have to add them to your Puppetfile (Which is good practice anyway because it means you can take updates whenever you want etc.