Unfortunately, certificates are generated with exec type (shell script).
As far as I know, there is no way to cat file contents into a puppet 
variable, hence the only option is to do two runs.

Thank you, Felix!

Cheers,
Gin

On Monday, December 29, 2014 10:20:17 PM UTC, Felix.Frank wrote:
>
> On 12/29/2014 06:40 PM, Gin wrote: 
> > As far as I know, facts are collected *before* the execution. 
> > therefore the following workflow will not work: 1. generate 
> > certificates 2. distribute them across the odes (including their 
> > contents). 
> > 
> > Any workaround for this? 
> > One idea I could come up is to export the file only if it exists and 
> > is not empty. 
> > That leads to a double run. On the first run the certificates would be 
> > generated. Then, on the second run the facter would be able to pick up 
> > the file contents. 
>
> Hi, 
>
> well, yes - if the information that you want to export comes available 
> *during* a Puppet run, you cannot export it until the next run. This 
> cannot be worked around, because the compiling phase is disjoint from 
> the catalog application phase, and exporting happens only during the 
> former. 
>
> How is the source file generated? If the master creates it, say, using a 
> template, it would be much easier to export the target file with a 
> `content` attribute that carries the expanded template to all receiving 
> agents. 
>
> HTH, 
> Felix 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0cc605c2-2430-4159-89c6-532a80d4578e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to