My suggestion would be to convert that file to a custom/external fact, and
then in your manifests write an if statement, adding the correct cron{} for
the matching fact.-- Lowe Schmidt | +46 723 867 157 On 22 February 2016 at 23:28, Scott Walker <[email protected]> wrote: > I'm slowly getting up to speed on puppet (coming over from chef but > honestly haven't used either in probably 3 years so I'm relearning the > learning curve.). > > We are using puppet 3.7.1 on our hosts, what I am trying to do is this. > > I have a file /etc/install-class which when we kickstart a machine > depending on what you choose will result in this file having CLASS="some > string" > > I am trying to find the "proper" way to create a cron job based on this > file. > > IE: if /etc/install-class == CLASS=render then create a cron job otherwise > do nothing. > > I know I can hackily get around this with doing it in bash and a onlyif > exec statement. But running a shell, then running grep, is expensive > timewise (yes yes, only a few ms but when trying to get machines built ASAP > ms add up). > > I've done a lot of digging today but I can't seem to figure out an elegant > way to make this work without involving a few modules written by people > (I'm not adverse to using modules but I don't like using a module to do > something rather simple.. or at least what I consider something simple). > > Some thoughts? And thanks in advance for the help. > > -- > 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/c73e8467-e567-425c-a896-f56ff58ef33d%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/c73e8467-e567-425c-a896-f56ff58ef33d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAC-wWcS_7gkiuT2rG2shP3J90dh_w262VnPDxaS3KNf4BwVuhw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
