Hi, I have tried to use Foreman API for pull some data from foreman's 
database.
I write test_module and integrate it into Foreman:

class enc {

  $hosts = foreman("hostgroup=devops", "state=all")

  file {'/tmp/test.conf':
    ensure  => present,
    content => template('enc/test.erb'),
  }

}


When I try to do puppet agent -t one test node this error has occur:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
Server Error: Evaluation Error: Error while evaluating a Resource 
Statement, Evaluation Error: Unknown function: 'foreman'. at 
/etc/puppetlabs/code/environments/production/modules/enc/manifests/init.pp:3:12 
on node centos-25


I have foreman.rb there: 
/usr/share/foreman-installer/modules/foreman/lib/puppet/parser/functions/foreman.rb

What's wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to