aboutsummaryrefslogtreecommitdiff
path: root/manifests/autoupgrade.pp
blob: cd7a6d5bbe359ccb309be011faba6d58d815d9ea (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class drupal::autoupgrade {
  # Keep 9.x codebase updated
  cron { "drupal-autoupgrade-9.x":
    command     => "/usr/local/bin/drupal upgrade 9",
    user        => root,
    # Run once a week after security releases (usually on Wednesdays)
    weekday     => 5,
    hour        => "01",
    minute      => "30",
    environment => [ 'SILENT=yes' ],
    ensure      => present,
    require     => [ File['/usr/local/bin/drupal'], User['drupal'] ],
  }

  # Keep 8.x codebase updated
  cron { "drupal-autoupgrade-8.x":
    command     => "/usr/local/bin/drupal upgrade 8",
    user        => root,
    # Run once a week after security releases (usually on Wednesdays)
    weekday     => 5,
    hour        => "01",
    minute      => "30",
    environment => [ 'SILENT=yes' ],
    ensure      => present,
    require     => [ File['/usr/local/bin/drupal'], User['drupal'] ],
  }

  # Keep 7.x codebase updated
  cron { "drupal-autoupgrade-7.x":
    command     => "/usr/local/bin/drupal upgrade 7",
    user        => root,
    # Run once a week after security releases (usually on Wednesdays)
    weekday     => 5,
    hour        => "01",
    minute      => "30",
    environment => [ 'SILENT=yes' ],
    ensure      => present,
    require     => [ File['/usr/local/bin/drupal'], User['drupal'] ],
  }
}