From b03fc2c20d7e8ab9c289d86d6c06e58d550c14dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Wed, 13 May 2020 19:51:15 -0400 Subject: [PATCH] Manage the 'cron' package using ensure_package() This makes it easier for other modules also trying to manage the 'cron' package not to conflict. --- manifests/backup/mysqlbackup.pp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/manifests/backup/mysqlbackup.pp b/manifests/backup/mysqlbackup.pp index 6e805bc25..730264952 100644 --- a/manifests/backup/mysqlbackup.pp +++ b/manifests/backup/mysqlbackup.pp @@ -66,17 +66,11 @@ } if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' { - package {'crontabs': - ensure => present, - } + ensure_packages('crontabs') } elsif $::osfamily == 'RedHat' { - package {'cronie': - ensure => present, - } + ensure_packages('cronie') } elsif $::osfamily != 'FreeBSD' { - package {'cron': - ensure => present, - } + ensure_packages('cron') } cron { 'mysqlbackup-weekly':