forked from ungleich-public/cdist
in PATH we trust
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
94cdf36439
commit
2cf67e321e
2 changed files with 4 additions and 4 deletions
|
@ -29,10 +29,10 @@ if [ "$state_should" != "$state_is" ]; then
|
|||
if [ -f "$__object/parameter/owner" ]; then
|
||||
owner="-O '$(cat "$__object/parameter/owner")'"
|
||||
fi
|
||||
echo "su - postgres -c \"/usr/bin/createdb $owner '$name'\""
|
||||
echo "su - postgres -c \"createdb $owner '$name'\""
|
||||
;;
|
||||
absent)
|
||||
echo "su - postgres -c \"/usr/bin/dropdb '$name'\""
|
||||
echo "su - postgres -c \"dropdb '$name'\""
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
@ -45,10 +45,10 @@ if [ "$state_is" != "$state_should" ]; then
|
|||
[ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT"
|
||||
|
||||
cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit"
|
||||
echo "su - postgres -c \"/usr/bin/psql -c \\\"$cmd\\\"\""
|
||||
echo "su - postgres -c \"psql -c \\\"$cmd\\\"\""
|
||||
;;
|
||||
absent)
|
||||
echo "su - postgres -c \"/usr/bin/dropuser \\\"$name\\\"\""
|
||||
echo "su - postgres -c \"dropuser \\\"$name\\\"\""
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue