From 6e72908f006f4a67035536f00cd91fd6ef10884a Mon Sep 17 00:00:00 2001 From: kapouik <11168702+kapouik@users.noreply.github.com> Date: Wed, 19 Jun 2019 19:20:09 +0200 Subject: [PATCH] Freebsd compat on backup (#1208) * Add support for FreeBSD on backup --- manifests/backup/mysqlbackup.pp | 18 +++++++++++------- manifests/backup/mysqldump.pp | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/manifests/backup/mysqlbackup.pp b/manifests/backup/mysqlbackup.pp index 5696a90c3..3cd4e150b 100644 --- a/manifests/backup/mysqlbackup.pp +++ b/manifests/backup/mysqlbackup.pp @@ -63,13 +63,17 @@ require => Mysql_user["${backupuser}@localhost"], } - if $::osfamily == 'RedHat' { - package {'cronie': - ensure => present, - } - } else { - package {'cron': - ensure => present, + if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' { + package {'crontabs': + ensure => present, + } + } elsif $::osfamily == 'RedHat' { + package {'cronie': + ensure => present, + } + } elsif $::osfamily != 'FreeBSD' { + package {'cron': + ensure => present, } } diff --git a/manifests/backup/mysqldump.pp b/manifests/backup/mysqldump.pp index 6ee8eb466..01d260ef0 100644 --- a/manifests/backup/mysqldump.pp +++ b/manifests/backup/mysqldump.pp @@ -55,16 +55,16 @@ } if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' { - package {'crontabs': - ensure => present, - } - } elsif $::osfamily == 'RedHat' { - package {'cronie': - ensure => present, - } - } else { - package {'cron': - ensure => present, + package {'crontabs': + ensure => present, + } + } elsif $::osfamily == 'RedHat' { + package {'cronie': + ensure => present, + } + } elsif $::osfamily != 'FreeBSD' { + package {'cron': + ensure => present, } }