Hi all,
I'm learning all about exported resources, and I've encountered an
issue. Put simply, two things which logically should be same result in
one working and one not working. I'm sure I'm missing something
obvious, but I can't see it, so I'm someone can spot my error.
The situation: I'm running stock Debian 2.6.2 on master and client. I'm
defining a simple File export which creates a directory on another
machine. Here's the code that works:
class client {
@@file{ "/mnt/backups/$hostname":
ensure => directory,
owner => "remotebackup",
group => "users",
tag => "rsync::coreserver::$region",
}
}
class server {
File <<| tag == "rsync::coreserver::$region" |>>
}
This works exactly as expected - the "server" machine creates a
directory named as per the client's hostname. However, if I wrap this
in a define(), it all goes wrong. Here's the code:
class client {
@@rsync::target{ "$hostname": tag => "rsync::coreserver::$region" }
}
class server {
Rysnc::Target <<| tag == "rsync::coreserver::$region" |>>
}
define rsync::target() {
file{ "/mnt/backups/$name":
ensure => directory,
owner => "remotebackup",
group => "users",
}
}
The define just wraps up the file definition so it's easier for me to
collect the right resources in the server class. But it doesn't work.
The server doesn't create any directories, although I can see entries
in the storeconfig db for the rsync::target resource type. What am I
missing?
Many thanks,
Greg Sutcliffe
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.