Added gnu module for installing GNU tools
This commit is contained in:
parent
1c2fcb7004
commit
223acd61a8
2 changed files with 31 additions and 0 deletions
28
gnu/manifests/init.pp
Normal file
28
gnu/manifests/init.pp
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
}
|
|
@ -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"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue