]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Silent autoupgrades
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 30 Dec 2017 01:25:28 +0000 (23:25 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 30 Dec 2017 01:25:28 +0000 (23:25 -0200)
files/drupal
manifests/autoupgrade.pp

index 644b7765f42516ebb8f016f6d0c2ac96d3d16cd3..d51fd10007c2f6427d6e063469d0279fd47f100a 100755 (executable)
@@ -38,7 +38,9 @@ function drupal_get_major {
 # Check for existing installations
 function drupal_check_existing {
   if [ -e "$BASE/drupal-$1" ]; then
-    echo "Folder $BASE/drupal-$1 already exists, skipping"
+    if [ "$SILENT" != "yes" ]; then
+      echo "Folder $BASE/drupal-$1 already exists, skipping"
+    fi
     exit
   fi  
 }
@@ -46,7 +48,9 @@ function drupal_check_existing {
 # Check for non existing installations
 function drupal_check_not_existing {
   if [ ! -e "$BASE/drupal-$1" ]; then
-    echo "Folder $BASE/drupal-$1 does not exist, skipping"
+    if [ "$SILENT" != "yes" ]; then
+      echo "Folder $BASE/drupal-$1 does not exist, skipping"
+    fi
     exit 1
   fi  
 }
index 2bd5c1f17233de7c38b5a10231070983a3380458..6aa881bc52b3c775a5bf266d25da92bcdaf8da8e 100644 (file)
@@ -1,25 +1,27 @@
 class drupal::autoupgrade {
   # Keep 8.x codebase updated
   cron { "drupal-autoupgrade-8.x":
-    command  => "/usr/local/bin/drupal upgrade 8",
-    user     => root,
+    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",
-    ensure   => present,
-    require  => [ File['/usr/local/bin/drupal'], User['drupal'] ],
+    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,
+    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",
-    ensure   => present,
-    require  => [ File['/usr/local/bin/drupal'], User['drupal'] ],
+    weekday     => 5,
+    hour        => "01",
+    minute      => "30",
+    environment => [ 'SILENT=yes' ],
+    ensure      => present,
+    require     => [ File['/usr/local/bin/drupal'], User['drupal'] ],
   }
 }