From: Peter Palfrader Date: Sat, 28 Sep 2019 19:01:41 +0000 (+0200) Subject: Use template variable from the correct scope X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=cb14bc7f1fa660424ab16d5210f14bc891fe442a;p=mirror%2Fdsa-puppet.git Use template variable from the correct scope --- diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index 4d78c99aa..97fabc2b6 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -1,4 +1,4 @@ -# + class postgres::backup_server { include postgres::backup_server::globals diff --git a/modules/postgres/templates/backup_server/postgres-make-base-backups.erb b/modules/postgres/templates/backup_server/postgres-make-base-backups.erb index 2141833a2..0a710496a 100755 --- a/modules/postgres/templates/backup_server/postgres-make-base-backups.erb +++ b/modules/postgres/templates/backup_server/postgres-make-base-backups.erb @@ -42,7 +42,7 @@ STATEDIR=/var/lib/dsa/postgres-make-base-backups set -u if [ "$(id -u)" = 0 ]; then - echo >&2 "Do not run me as root. Probably you want sudo -u <%= @backup_unix_user %>." + echo >&2 "Do not run me as root. Probably you want sudo -u <%= scope['postgres::backup_server::globals::backup_unix_user'] %>." exit 1 fi diff --git a/modules/postgres/templates/backup_server/sudoers.erb b/modules/postgres/templates/backup_server/sudoers.erb index 3b31cbfe6..8dd41e626 100644 --- a/modules/postgres/templates/backup_server/sudoers.erb +++ b/modules/postgres/templates/backup_server/sudoers.erb @@ -1,3 +1,3 @@ # edit with visudo! -nagios ALL=(<%= @backup_unix_user %>) NOPASSWD: /usr/lib/nagios/plugins/dsa-check-backuppg "" +nagios ALL=(<%= scope['postgres::backup_server::globals::backup_unix_user'] %>) NOPASSWD: /usr/lib/nagios/plugins/dsa-check-backuppg ""