From 6a9bb5e23d2a94610fa2eaf255cd1364efdb358f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 2 Jun 2023 22:31:33 -0300 Subject: Parametrize drupal::maintenance --- manifests/maintenance.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/manifests/maintenance.pp b/manifests/maintenance.pp index d757122..b3f12b5 100644 --- a/manifests/maintenance.pp +++ b/manifests/maintenance.pp @@ -1,11 +1,14 @@ -class drupal::maintenance { +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 => present, + ensure => $cron, require => [ File['/usr/local/bin/drupal'], User['drupal'] ], } @@ -17,7 +20,7 @@ class drupal::maintenance { weekday => 5, hour => "02", minute => "30", - ensure => present, + ensure => $update, require => [ File['/usr/local/bin/drupal'], User['drupal'] ], } } -- cgit v1.2.3