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 => absent, 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'] ], } }