diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-07-13 19:33:11 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-07-13 19:33:11 +0200 |
commit | db66327da15391a95ef8b879398178b1dafd8a4e (patch) | |
tree | eac0f6c570154ac667dab8b2517b364459f805e1 /run | |
parent | Add pacman hooks to gandalf. (diff) | |
download | webdav_server-db66327da15391a95ef8b879398178b1dafd8a4e.tar.gz webdav_server-db66327da15391a95ef8b879398178b1dafd8a4e.tar.xz |
Spice up run script.
Diffstat (limited to 'run')
-rwxr-xr-x | run | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,4 +1,20 @@ #!/bin/bash -sudo /opt/puppetlabs/bin/puppet apply manifests \ - --modulepath=/etc/puppetlabs/code/environments/production/modules:modules +# 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" + +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 + ubuntu) + modpath=/etc/puppetlabs/code/environments/production/modules + ;; + arch) + modpath=/etc/puppetlabs/code/modules/ + ;; +esac + +sudo puppet apply manifests \ + --modulepath="${modpath}:modules" |