Use template variable from the correct scope
authorPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 19:01:41 +0000 (21:01 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 19:01:41 +0000 (21:01 +0200)
modules/postgres/manifests/backup_server.pp
modules/postgres/templates/backup_server/postgres-make-base-backups.erb
modules/postgres/templates/backup_server/sudoers.erb

index 4d78c99..97fabc2 100644 (file)
@@ -1,4 +1,4 @@
-#
+
 class postgres::backup_server {
   include postgres::backup_server::globals
 
index 2141833..0a71049 100755 (executable)
@@ -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
 
index 3b31cbf..8dd41e6 100644 (file)
@@ -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 ""