Hello all,
The key issue is, if I uncomment the line:
Myresource <<| |>> { ensure => present }
(Despite having defined the resource) I get the error:
err: Could not find type Myresource on node hmaster
I'm attempting to follow the instructions from the book Pro Puppet pgs.
143-145; however, it seems that I'm very lost, as I am unable to export
and collect my resource while I am able to export and collect both host
and sshkey resources fine. Am I doing something incorrectly?
I am using Puppet 2.7.5 on both my puppet master (Debian with puppet built from
source) and clients (CentOS 5 with puppet from rpmforge).
A unit test to show the failure is as follows (everything in site.pp):
----------------------------------------------------------------------
node /hslave[0-9].local/ {
class{"hslave":}
}
node /hmaster.local/ {
class{"hslave": before => Class["hslave_file"]}
class{"hslave_file":}
}
class hslave {
# This works
@myresource{ "${::hostname}-virtual": }
# This "works" but can't seem to be collected
@@myresource{ "${::hostname}": }
}
class hslave_file{
# This fails with:
# err: Could not find type Myresource on node hmaster
# Myresource <<| |>> { ensure => present }
# This works fine
Myresource <| |> { ensure => present }
# This works fine
myresource { "${::hostname}-extra": ensure => present }
}
define myresource($ensure = present) {
file { "/tmp/puppet_test$name": ensure => $ensure }
}
For reference, after running this on "hmaster" I have:
[hadmin@hmaster ~]$ ls -l /tmp/*hmaster*
-rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster
-rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-extra
-rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-virtual
Thank you,
Clay
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.