I am attempting to implement exported resources for several things, eg.
nagios, backuppc, etc., but i am confused by the results i am seeing.
puppet version is 0.24.1 and os is CentOS 5.1.
The following should, i think, create a virtual exported
''file'' resource
on "node1", "node2" and "node3", and only
"node1" and "node3" should
actually create the file on the filesystem.
class test1 {
file { "/tmp/puppet.testing1": ensure => directory, purge
=> true,
recurse => true }
@@file { "/tmp/puppet.testing1/${fqdn}": content =>
"${fqdn}", tag
=> "testing1" }
}
class test2 {
file { "/tmp/puppet.testing2": ensure => directory, purge
=> true,
recurse => true }
@@file { "/tmp/puppet.testing2/${fqdn}": content =>
"${fqdn}", tag
=> "testing2" }
}
node node1 { include test1,test2
File <<| tag == "testing1" |>>
}
node node2 { include test1,test2 }
node node3 { include test1,test2
File <<| tag == "testing2" |>>
}
But "node1" and "node3" only get the resource they created
themselves
and not the two other nodes.
If I remove the ''tag == "testing"'' then all
resources are collected.
node node3 { include test
File <<| |>>
}
Problem with that is of course that the "node3" should not have the
files from Class["test1"].
Am i missing something?
Ben