summaryrefslogtreecommitdiff
path: root/run
blob: 28b72edd56a104bec9d3a795a9c17dca431af45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# 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" \
	--verbose \
	"$@"