Skip to content

Commit 0567d11

Browse files
committed
Don't try to install cron packages by default
1 parent 6e1980a commit 0567d11

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

manifests/backup/mysqlbackup.pp

+14-11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
$file_per_database = false,
2222
$include_triggers = true,
2323
$include_routines = false,
24+
$install_cron = false,
2425
$ensure = 'present',
2526
$time = ['23', '5'],
2627
$prescript = false,
@@ -64,17 +65,19 @@
6465
require => Mysql_user["${backupuser}@localhost"],
6566
}
6667

67-
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
68-
package {'crontabs':
69-
ensure => present,
70-
}
71-
} elsif $::osfamily == 'RedHat' {
72-
package {'cronie':
73-
ensure => present,
74-
}
75-
} elsif $::osfamily != 'FreeBSD' {
76-
package {'cron':
77-
ensure => present,
68+
if $install_cron {
69+
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
70+
package {'crontabs':
71+
ensure => present,
72+
}
73+
} elsif $::osfamily == 'RedHat' {
74+
package {'cronie':
75+
ensure => present,
76+
}
77+
} elsif $::osfamily != 'FreeBSD' {
78+
package {'cron':
79+
ensure => present,
80+
}
7881
}
7982
}
8083

manifests/backup/mysqldump.pp

+14-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
$file_per_database = false,
2121
$include_triggers = false,
2222
$include_routines = false,
23+
$install_cron = false,
2324
$ensure = 'present',
2425
$time = ['23', '5'],
2526
$prescript = false,
@@ -57,17 +58,19 @@
5758
require => Mysql_user["${backupuser}@localhost"],
5859
}
5960

60-
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
61-
package {'crontabs':
62-
ensure => present,
63-
}
64-
} elsif $::osfamily == 'RedHat' {
65-
package {'cronie':
66-
ensure => present,
67-
}
68-
} elsif $::osfamily != 'FreeBSD' {
69-
package {'cron':
70-
ensure => present,
61+
if $install_cron {
62+
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
63+
package {'crontabs':
64+
ensure => present,
65+
}
66+
} elsif $::osfamily == 'RedHat' {
67+
package {'cronie':
68+
ensure => present,
69+
}
70+
} elsif $::osfamily != 'FreeBSD' {
71+
package {'cron':
72+
ensure => present,
73+
}
7174
}
7275
}
7376

0 commit comments

Comments
 (0)