Skip to content

Commit 88a8ca7

Browse files
committed
Change ensure_resource(file) back to file resources
Prior to this commit, we used ensure_resource because it was meant to be inside a defined type that may be specified more than once. Now the defined type is gone and backup is a class After this commit, we use file resources for clarity since the class should not be defined more than once.
1 parent 990d029 commit 88a8ca7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

manifests/backup.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
String $backup_logging_directory = '/var/log/puppetlabs/pe_databases_backup',
2424
) {
2525

26-
ensure_resource( 'file', [ '/opt/puppetlabs/pe_databases', '/opt/puppetlabs/pe_databases/scripts', $backup_directory ],
27-
{ 'ensure' => 'directory' }
28-
)
26+
file { ['/opt/puppetlabs/pe_databases', '/opt/puppetlabs/pe_databases/scripts', $backup_directory ] :
27+
ensure => directory,
28+
}
2929

30-
ensure_resource( 'file', $backup_logging_directory,
31-
{ 'ensure' => 'directory',
32-
'owner' => 'pe-postgres',
33-
'group' => 'pe-postgres', }
34-
)
30+
file { $backup_logging_directory :
31+
ensure => 'directory',
32+
owner => 'pe-postgres',
33+
group => 'pe-postgres',
34+
}
3535

3636
file { 'puppet_enterprise_db_backup_script' :
3737
ensure => file,
@@ -45,7 +45,7 @@
4545
$databases_and_backup_schedule.each | Hash $dbs_and_schedule | {
4646

4747
$databases_to_backup = $dbs_and_schedule['databases']
48-
$db_string = join($databases_to_backup, " ")
48+
$db_string = join($databases_to_backup, ' ')
4949

5050
cron { "puppet_enterprise_database_backup_${databases_to_backup}":
5151
ensure => present,

0 commit comments

Comments
 (0)