aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-27 20:34:18 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-27 20:34:18 -0200
commit8fe35a2abf1016af5dfbbe3b958e8351a93a0d55 (patch)
treeb935acf2dc42854bd7b67143de70ea114c49d5d9 /manifests
parente9c3cef4d02f5984dce207244d1b3fb01e4e91cc (diff)
downloadpuppet-drupal-8fe35a2abf1016af5dfbbe3b958e8351a93a0d55.tar.gz
puppet-drupal-8fe35a2abf1016af5dfbbe3b958e8351a93a0d55.tar.bz2
Auto-upgrade support
Diffstat (limited to 'manifests')
-rw-r--r--manifests/autoupgrade.pp25
-rw-r--r--manifests/maintenance.pp4
2 files changed, 27 insertions, 2 deletions
diff --git a/manifests/autoupgrade.pp b/manifests/autoupgrade.pp
new file mode 100644
index 0000000..c4a22cc
--- /dev/null
+++ b/manifests/autoupgrade.pp
@@ -0,0 +1,25 @@
+class drupal::autoupgrade {
+ # Keep 8.x codebase updated
+ cron { "drupal-autoupgrade-8.x":
+ command => "/usr/local/bin/drupal upgrade 8",
+ user => drupal,
+ # Run once a week after security releases (usually on Wednesdays)
+ weekday => 5,
+ hour => "01",
+ minute => "30",
+ 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 => drupal,
+ # Run once a week after security releases (usually on Wednesdays)
+ weekday => 5,
+ hour => "01",
+ minute => "30",
+ ensure => present,
+ require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
+ }
+}
diff --git a/manifests/maintenance.pp b/manifests/maintenance.pp
index 720089e..d757122 100644
--- a/manifests/maintenance.pp
+++ b/manifests/maintenance.pp
@@ -6,7 +6,7 @@ class drupal::maintenance {
hour => "*/1",
minute => "15",
ensure => present,
- require => [ File['/usr/local/sbin/drupal'], User['drupal'] ],
+ require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
}
# Keep themes and modules up-to-date
@@ -18,6 +18,6 @@ class drupal::maintenance {
hour => "02",
minute => "30",
ensure => present,
- require => User['drupal'],
+ require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
}
}