From 3a04413034796e32a46b667bfb01d43fd7a29fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 31 Oct 2021 01:04:48 +0200 Subject: Fixes to run script. --- run | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'run') diff --git a/run b/run index 28b72ed..789d1b6 100755 --- a/run +++ b/run @@ -2,9 +2,9 @@ # Needed on ubuntu, since this path is not set for root # Arch installs puppet in /usr/bin/puppet. -export PATH="/opt/puppetlabs/bin/puppet:$PATH" +export PATH="/opt/puppetlabs/bin/:$PATH" -osid=$(awk -F= '/^ID/ { print $2 }' /etc/os-release) +osid=$(awk -F= '/^ID=/ { print $2 }' /etc/os-release) # This is the WRONG way to do it, but it sholud work for now case $osid in @@ -16,7 +16,11 @@ case $osid in ;; esac -sudo puppet apply manifests \ - --modulepath="${modpath}:modules" \ +set -x + +sudo env PATH="/opt/puppetlabs/bin/:$PATH" \ + puppet apply \ + --modulepath="$PWD/modules:${modpath}" \ + manifests \ --verbose \ "$@" -- cgit v1.2.3