Puppet, Foreman and Modules

93 views
Skip to first unread message

James James

unread,
Mar 7, 2014, 11:56:09 AM3/7/14
to puppet...@googlegroups.com
Hello,
First of all, sorry for my poor english ....

I am trying to use foreman, puppet with modules. The razorsedge (https://forge.puppetlabs.com/razorsedge/network) network module.  I have created a manage folder in /etc/puppet/environments/production/modules/network/manifests/ which contains an alias.pp file.

cat alias.pp

class network::manage::alias ($ensure, $data) inherits network::alias {

    create_resources('network::alias', $data)
}

In foreman I have imported the network::manage::alias  and set the $data variable to this value :

em2:1: {ensure => up, ipaddress => 1.2.8.5, netmask   => 255.255.255.0,}

When I'm trying to apply on my node I've got this answer :
rror: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find parent resource type 'network::alias' of type hostclass in production at /etc/puppet/environments/production/modules/network/manifests/manage/alias.pp:1 on node ovirt-node1.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Can somebody help me ?

Regards.

James



jcbollinger

unread,
Mar 10, 2014, 9:40:22 AM3/10/14
to puppet...@googlegroups.com

Network::Alias is a defined resource type, not a class, therefore your class network::manage::alias cannot inherit from it (nor does it need to do).


John

Reply all
Reply to author
Forward
0 new messages