aboutsummaryrefslogtreecommitdiff
path: root/manifests/maintenance.pp
blob: b3f12b53b5f71d652b09fdd5f7163c79662b8300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class drupal::maintenance(
  $cron   = 'present',
  $update = 'present',
) {
  # Run drupal cron
  cron { "drupal-cron":
    command  => "/usr/local/bin/drupal cron &> /dev/null",
    user     => drupal,
    hour     => "*/1",
    minute   => "15",
    ensure   => $cron,
    require  => [ File['/usr/local/bin/drupal'], User['drupal'] ],
  }

  # Keep themes and modules up-to-date
  cron { "drupal-update":
    command  => "/usr/local/bin/drupal cron-update",
    user     => drupal,
    # Run once a week after security releases (usually on Wednesdays)
    weekday  => 5,
    hour     => "02",
    minute   => "30",
    ensure   => $update,
    require  => [ File['/usr/local/bin/drupal'], User['drupal'] ],
  }
}