From 223acd61a8c59ff2c92d212dcacbdcdf3032aacb Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 18 Apr 2012 15:48:11 +0300 Subject: [PATCH] Added gnu module for installing GNU tools --- gnu/manifests/init.pp | 28 ++++++++++++++++++++++++++++ util/manifests/init.pp | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 gnu/manifests/init.pp diff --git a/gnu/manifests/init.pp b/gnu/manifests/init.pp new file mode 100644 index 0000000..2174f80 --- /dev/null +++ b/gnu/manifests/init.pp @@ -0,0 +1,28 @@ +# Install GNU make. +# +class gnu::make { + + package { "make": + ensure => installed, + name => $operatingsystem ? { + "openbsd" => "gmake", + default => "make", + }, + } + +} + + +# Install GNU tar. +# +class gnu::tar { + + package { "tar": + ensure => installed, + name => $operatingsystem ? { + "openbsd" => "gtar", + default => "tar", + }, + } + +} diff --git a/util/manifests/init.pp b/util/manifests/init.pp index 7aa6bfb..b89fcfc 100644 --- a/util/manifests/init.pp +++ b/util/manifests/init.pp @@ -23,6 +23,8 @@ # define util::extract::tar($source, $ensure=present, $strip=0, $preserve=false) { + include gnu::tar + case $ensure { latest: { exec { "tar-rmdir-${name}": @@ -67,6 +69,7 @@ define util::extract::tar($source, $ensure=present, $strip=0, $preserve=false) { command => $command, require => File[$name], unless => "test -n \"$(ls -A ${name})\"", + require => Package["tar"], } }