On Oct 11, 2012, at 7:48 AM, Maarten Thibaut <[email protected]> wrote:

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


If so, has anyone thought of any strategies to overcome this issue?

Thanks!
maarten

-- 
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/8T_SC00sFYAJ.
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.

-- 
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.

Reply via email to