more changes
This commit is contained in:
parent
73e76766f1
commit
9b33e9dd17
@ -2,10 +2,10 @@ class god {
|
||||
gem { 'god':
|
||||
path => "${ruby::path}:${base::path}",
|
||||
ensure => present,
|
||||
require => Make_and_install['ruby']
|
||||
require => Class['ruby']
|
||||
}
|
||||
|
||||
$bin = "${base::install_path}/ruby/bin/god"
|
||||
$bin = "${ruby::path}//god"
|
||||
$dir = config_path("god.d")
|
||||
$pid = pid_path($name)
|
||||
$log = log_path($name)
|
||||
|
@ -1,6 +1,20 @@
|
||||
class ruby($version, $configure = "--disable-install-doc", $build_path = '') {
|
||||
class ruby($version, $deb_url = '', $configure = "--disable-install-doc", $build_path = '') {
|
||||
gem { [ 'bundler', 'penchant' ]:
|
||||
path => "${path}:${base::path}",
|
||||
ensure => present
|
||||
}
|
||||
|
||||
if ($deb_url) {
|
||||
$path = '/usr/bin'
|
||||
|
||||
remotedeb { ruby:
|
||||
url => $deb_url,
|
||||
version => $version
|
||||
}
|
||||
|
||||
Remotedeb[ruby] -> Gem['bundler', 'penchant']
|
||||
} else {
|
||||
$path = bin_path($name)
|
||||
$with_ruby_path = "${path}:${base::path}"
|
||||
|
||||
build_and_install { $name:
|
||||
version => $version,
|
||||
@ -29,10 +43,7 @@ class ruby($version, $configure = "--disable-install-doc", $build_path = '') {
|
||||
}
|
||||
}
|
||||
|
||||
gem { [ 'bundler', 'penchant' ]:
|
||||
require => Build_and_install[$name],
|
||||
path => $with_ruby_path,
|
||||
ensure => present
|
||||
Build_and_install[ruby] -> Gem['bundler', 'penchant']
|
||||
}
|
||||
}
|
||||
|
||||
|
23
shared/modules/debsource/manifests/init.pp
Normal file
23
shared/modules/debsource/manifests/init.pp
Normal file
@ -0,0 +1,23 @@
|
||||
define debsource($apt_source, $keyfile = '', $host = '', $hash = '') {
|
||||
$file = "/etc/apt/sources.list.d/${name}.list"
|
||||
file { $file: content => $apt_source }
|
||||
|
||||
if ($host != '') {
|
||||
exec { "debsource-${name}":
|
||||
command => "apt-key adv --keyserver ${host} --recv ${hash} && apt-get update",
|
||||
unless => "test $(apt-key list | grep ${hash} | wc -l) -ne 0",
|
||||
path => $base::path,
|
||||
require => File[$file]
|
||||
}
|
||||
}
|
||||
|
||||
if ($keyfile != '') {
|
||||
exec { "debsource-${name}":
|
||||
command => "curl $keyfile | apt-key add -",
|
||||
path => $base::path,
|
||||
require => File[$file],
|
||||
unless => "test $(apt-key list | grep ${hash} | wc -l) -ne 0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
shared/modules/remotedeb/manifests/init.pp
Normal file
10
shared/modules/remotedeb/manifests/init.pp
Normal file
@ -0,0 +1,10 @@
|
||||
define remotedeb($url, $version) {
|
||||
$deb = "/tmp/${name}.deb"
|
||||
|
||||
exec { "remotedeb-${name}":
|
||||
command => "curl -o ${deb} ${url} && dpkg -i ${deb}",
|
||||
unless => "test $(dpkg -l ${name} | grep ${version} | wc -l) -ne 0",
|
||||
path => $base::path
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.puppet
|
||||
<%= use_sudo ? "sudo env" : "" %> RUBYLIB="${PWD}/shared/lib" \
|
||||
<%= use_sudo ? "sudo env" : "" %> RUBYLIB="${PWD}/lib:${PWD}/shared/lib" \
|
||||
<%= with_additional_puppet_bin_path %> \
|
||||
puppet apply <%= additional_puppet_options %> \
|
||||
--confdir=$PWD \
|
||||
|
Loading…
Reference in New Issue
Block a user