aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-06 13:56:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-06 13:56:06 -0300
commit02e22f6e8f3c6438ccccb126f36c35426e2f725f (patch)
tree4eac46e9ce41b444ec41031cd5dd248371fb97f9
parent1556252c2a083bf53bc2a75e4a3295d8f1a50210 (diff)
downloadpuppet-bootstrap-02e22f6e8f3c6438ccccb126f36c35426e2f725f.tar.gz
puppet-bootstrap-02e22f6e8f3c6438ccccb126f36c35426e2f725f.tar.bz2
Dependencies update
-rw-r--r--Makefile2
-rwxr-xr-xbin/dependencies8
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1ccf197..f3ed336 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ CWD = $(shell pwd)
REPO = git://git.sarava.org/puppet-bootstrap.git
PUPPET = FACTER_BOOTSTRAP_PATH="$(CWD)" puppet apply --confdir="$(CWD)" --modulepath=modules
-all: clean remote modules config
+all: deps clean remote modules config
deps:
bin/dependencies
diff --git a/bin/dependencies b/bin/dependencies
index c410852..7fda4fb 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -13,10 +13,16 @@ function provision_package {
if [ "$?" == "1" ]; then
echo "Installing package $1..."
- DEBIAN_FRONTEND=noninteractive apt-get install $1 -y
+ DEBIAN_FRONTEND=noninteractive $sudo apt-get install $1 -y
fi
}
+# Set sudo config
+local sudo device rsync
+if [ "`whoami`" != 'root' ]; then
+ sudo="sudo"
+fi
+
# Ensure basic packages are installed.
for package in puppet ruby-hiera-puppet mr whois; do
provision_package $package