Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Infrastructure (http://www.linux-archive.org/fedora-infrastructure/)
-   -   cron jobs and puppet (http://www.linux-archive.org/fedora-infrastructure/673466-cron-jobs-puppet.html)

seth vidal 06-01-2012 05:38 AM

cron jobs and puppet
 
From now on -PLEASE- no one use the cron {} keyword in puppet.

If you need to put a cron job in place via puppet you do it either
using /etc/cron.[hourly|daily] or you put a .cron file in /etc/cron.d
and reference it that way.

I am so tired of having to chase through /var/spool/cron for system
cron jobs and I'm really tired of ensure=absent for cron jobs not
working.

so no more.

it's gone.

poof.

I'll work on rooting out the rest of them as I get to them.

-sv
_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

Pablo Iranzo Gómez 06-01-2012 07:27 AM

cron jobs and puppet
 
Probably not related, but at my home setup I use at 'site.pp':

# manage cron jobs in separate files - call with enable => "false" to delete the job
define cron_job( $enable = "true", $interval = "daily", $script = "", $package = "" ) {
file { "/etc/cron.$interval/$name":
content => $script,
ensure => $enable ? {
"false" => absent,
default => file,
},
force => true,
owner => root,
group => root,
mode => $interval ? {
"d" => 644,
default => 755,
},
require => $package ? {
"" => undef,
default => $package,
},
}
}


So I can create new cron jobs like:

cron_job { "test":
interval => "hourly",
enable => "false",
script => "#!/bin/bash
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
date >> /tmp/test.log
",
}

Would this be useful for Fedora Infrastructure?

Regards
Pablo


----- Mensaje original -----
> De: "seth vidal" <skvidal@fedoraproject.org>
> Para: "infrastructure" <infrastructure@lists.fedoraproject.org>
> Enviados: Viernes, 1 de Junio 2012 7:38:12
> Asunto: cron jobs and puppet
>
> From now on -PLEASE- no one use the cron {} keyword in puppet.
>
> If you need to put a cron job in place via puppet you do it either
> using /etc/cron.[hourly|daily] or you put a .cron file in /etc/cron.d
> and reference it that way.
>
> I am so tired of having to chase through /var/spool/cron for system
> cron jobs and I'm really tired of ensure=absent for cron jobs not
> working.
>
> so no more.
>
> it's gone.
>
> poof.
>
> I'll work on rooting out the rest of them as I get to them.
>
> -sv
> _______________________________________________
> infrastructure mailing list
> infrastructure@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/infrastructure

--

Pablo Iranzo Gómez (Pablo.Iranzo@redhat.com)
Senior Global Profesional Services Consultant (RHCA, RHCSS, RHCDS, RHCVA, RHCE, RHCSA, RHCSP) #110-215-852
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0x5BD8E1E4

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure


All times are GMT. The time now is 04:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.