Hi,
I'm trying to use collections as shown below. The files I wish to collect get populated on the client, so the puppetmaster doesn't know the contents. I.e. I need to push these files to the server, and then distribute them back to the clients:
@@file { "/etc/ssh-keys.d/$hostname.pub":
tag => "ssh_pub_keys",
require => Exec["copy_key"],
}
File <<| tag == 'ssh_pub_keys' |>>
But this isn't working. Do collections only work for files where the puppetmaster provides the content?
The way I've thought about collections is that they only work when the compiler has the data you want in a variable and that variable is fed into the resource's parameter value.
So the way I get data off the client and into the master is by using a custom fact. The fact gets the data into a variable, then the variable is used in the (exported) resource declaration.
Hope this helps,
-Jeff