diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-26 00:39:14 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-26 00:44:53 +0200 |
commit | 2ec6746cf2564470f514319cb73c36d867be4078 (patch) | |
tree | 68925142ed37ef3ec33c7494bf43420d4e58dc32 /modules/role | |
parent | d60467e093d6cf1170a9cbbc5c03b80b8ec1da4a (diff) | |
download | Puppet-2ec6746cf2564470f514319cb73c36d867be4078.tar.gz Puppet-2ec6746cf2564470f514319cb73c36d867be4078.tar.zst Puppet-2ec6746cf2564470f514319cb73c36d867be4078.zip |
Cleanup backup hosts information lookup
Diffstat (limited to 'modules/role')
-rw-r--r-- | modules/role/manifests/backup/postgresql.pp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/role/manifests/backup/postgresql.pp b/modules/role/manifests/backup/postgresql.pp index e891195..b26773c 100644 --- a/modules/role/manifests/backup/postgresql.pp +++ b/modules/role/manifests/backup/postgresql.pp | |||
@@ -94,7 +94,15 @@ class role::backup::postgresql inherits role::backup { | |||
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | $pg_backup_hosts.each |$pg_backup_host, $pg_infos| { | 97 | $pg_backup_hosts.each |$backup_host_cn, $pg_infos| { |
98 | $host = find_host($facts["ldapvar"]["other"], $backup_host_cn) | ||
99 | if empty($host) { | ||
100 | $pg_backup_host = $backup_host_cn | ||
101 | } elsif has_key($host["vars"], "host") { | ||
102 | $pg_backup_host = $host["vars"]["host"][0] | ||
103 | } else { | ||
104 | $pg_backup_host = $host["vars"]["real_hostname"][0] | ||
105 | } | ||
98 | $pg_path = "$mountpoint/$pg_backup_host/postgresql" | 106 | $pg_path = "$mountpoint/$pg_backup_host/postgresql" |
99 | $pg_backup_path = "$mountpoint/$pg_backup_host/postgresql_backup" | 107 | $pg_backup_path = "$mountpoint/$pg_backup_host/postgresql_backup" |
100 | $pg_host = "$pg_backup_host" | 108 | $pg_host = "$pg_backup_host" |