[Puppet-users] Virtual resource not found
Joshua Timberman
joshua.timberman at gmail.com
Wed Aug 22 18:44:33 CDT 2007
Hi All,
I asked on IRC but didn't have everything organized and most people
seemed busy. Hoping someone can see what I'm missing here.
I'm trying to create a network module, used similar to the 'users'
configuration described in the Best Practices document. I have a users
module which has that and it works with similar syntax to below. If I
"unvirtualize" the network_interface for test1a-eth1 under the
network_dmz_virt class, this works.
Please help. Let me know if I need to provide more information. Node
information is set up per the Best Practices, in nodes.pp and
templates.pp respectively. The other manifests are in
modules/network/manifests/(classes|definitions).
test1a:~
$ sudo puppetd --server 10.1.0.70 --test
notice: Ignoring cache
err: Could not retrieve configuration: Failed to find virtual
resources Network_interface[test1a-eth1]
warning: Not using cache on failed configuration
node test1a inherits test_server {
realize Network_interface["test1a-eth1"]
}
node test_server inherits basenode {
include network_dmz_virt
}
(all basenode classes are working)
class network_dmz_virt {
$domain = "mydomain.com"
$broadcast = "10.1.0.255"
$network = "10.1.0.0"
$netmask = "255.255.255.0"
$gateway = "10.1.0.1"
@network_interface { "test1a-eth1":
hostname => "test1a",
iface => "eth1",
ip => "10.1.0.5",
domain => $domain,
broadcast => $broadcast,
network => $network,
netmask => $netmask,
gateway => $gateway,
}
}
define network_interface ( $hostname, $iface, $ip, $domain,
$broadcast, $network, $netmask, $gateway) {
file { "/etc/sysconfig/network-scripts/ifcfg-$iface":
owner => root,
group => root,
mode => 644,
content => template("network/ifcfg.erb"),
}
file { "/etc/sysconfig/network":
owner => root,
group => root,
mode => 644,
content => template("network/network.erb"),
}
}
More information about the Puppet-users
mailing list