diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-04 12:05:56 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-04 12:05:56 -0300 |
commit | 4c1bab861dba2f1d8bca76b5545729189a508f54 (patch) | |
tree | 7bb30e3c3b065ee1b28855ceba7ef320340aa9e3 | |
parent | 3f871bf28d79fd2446f8f07e10249b288b7bbc6e (diff) | |
download | puppet-bootstrap-4c1bab861dba2f1d8bca76b5545729189a508f54.tar.gz puppet-bootstrap-4c1bab861dba2f1d8bca76b5545729189a508f54.tar.bz2 |
Make deps target
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | TODO.md | 2 | ||||
-rwxr-xr-x | bin/dependencies | 23 | ||||
-rwxr-xr-x | bin/provision | 21 |
5 files changed, 32 insertions, 18 deletions
@@ -19,6 +19,9 @@ CWD = $(shell pwd) all: clean remote modules +deps: + bin/dependencies + modules: mr up @@ -14,6 +14,7 @@ You'll basically use the `bootstrap` repository as your `puppet` repository: git clone git://git.sarava.org/puppet-bootstrap.git puppet cd puppet && git tag -v # check integrity + make deps # install dependencies make submodules # add all needed puppet module as as git submodules make config # basic configuration @@ -1,8 +1,6 @@ TODO ==== -* Make `deps` target: - * Installs all needed packages (puppet, ruby-hiera-puppet, mr, etc). * Make `config` target: * Check if already ran. * Move from `config.pp` to hiera. diff --git a/bin/dependencies b/bin/dependencies new file mode 100755 index 0000000..148ab84 --- /dev/null +++ b/bin/dependencies @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Simple shell provisioner for Vagrant instances. +# + +# Install a package, thanks to the Hydra Suite. +function provision_package { + if [ -z "$1" ]; then + return + fi + + dpkg -s $1 &> /dev/null + + if [ "$?" == "1" ]; then + echo "Installing package $1..." + DEBIAN_FRONTEND=noninteractive apt-get install $1 -y + fi +} + +# Ensure basic packages are installed. +for package in puppet ruby-hiera-puppet mr; do + provision_package $package +done diff --git a/bin/provision b/bin/provision index fa76b53..4d096b8 100755 --- a/bin/provision +++ b/bin/provision @@ -3,25 +3,14 @@ # Simple shell provisioner for Vagrant instances. # -# Install a package, thanks to the Hydra Suite. -function provision_package { - if [ -z "$1" ]; then - return - fi - - dpkg -s $1 &> /dev/null - - if [ "$?" == "1" ]; then - echo "Installing package $1..." - DEBIAN_FRONTEND=noninteractive apt-get install $1 -y - fi -} - # Ensure the system is updated. sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean -# Ensure basic packages are installed. -for package in sqlite3 libsqlite3-ruby ruby-hiera-puppet libactiverecord-ruby ruby-sqlite3 usbutils; do +# Install dependencies +source /vagrant/puppet/bin/dependencies + +# Ensure additional dependencies are installed. +for package in sqlite3 libsqlite3-ruby libactiverecord-ruby ruby-sqlite3 usbutils; do provision_package $package done |