Skip to content

Commit

Permalink
Start working on systemd timer support
Browse files Browse the repository at this point in the history
  • Loading branch information
GregSutcliffe committed Sep 26, 2015
1 parent 56bd62d commit 1fa8875
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manifests/agent/service.pp
Expand Up @@ -43,6 +43,13 @@
}
}
}
'systemd.timer': {
$times = ip_to_cron($puppet::runinterval)
file { '/tmp/puppetcron.timer':
#file { '/etc/systemd/system/puppetcron.timer':
content => template('puppet/agent/systemd.puppetcron.timer.erb')
}
}
'none': {
service { 'puppet':
ensure => stopped,
Expand Down
10 changes: 10 additions & 0 deletions templates/agent/systemd.puppetcron.timer.erb
@@ -0,0 +1,10 @@
[Unit]
Description=Puppet Agent via systemd.timer

[Timer]
OnActiveSec=0m
OnCalendar=<%= times[0] %>:<%= times[1] %>
Persistent=true

[Install]
WantedBy=timers.target

0 comments on commit 1fa8875

Please sign in to comment.