Showing with 88 additions and 18 deletions.
  1. +3 −0 CHANGELOG
  2. +1 −1 Modulefile
  3. +2 −1 README.md
  4. +1 −0 files/webhook
  5. +6 −1 manifests/params.pp
  6. +11 −15 manifests/webhook.pp
  7. +2 −0 manifests/webhook/config.pp
  8. +50 −0 metadata.json
  9. +12 −0 spec/classes/webhook.rb
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2.6.0 - Eli Young & Ranjit Viswakumar
* Add bind_address to webhook
* bump r10k version to 1.4.1
2.5.4 - Zack Smith
* Fix webhook init script issue
2.5.3 - Eli Young & te206676
Expand Down
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'zack-r10k'
version '2.5.4'
version '2.6.0'
source 'https://github.com/acidprime/r10k'
author 'zack'
license 'Apache License, Version 2.0'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class { 'r10k':

| Module Version | r10k Version |
| -------------- | ------------ |
| v2.5.x | 1.4.0 |
| v2.6.x | 1.4.1 |
| v2.5.4 | 1.4.0 |
| v2.4.4 | 1.3.5 |
| v2.3.1 | 1.3.4 |
| v2.3.0 | 1.3.2 |
Expand Down
1 change: 1 addition & 0 deletions files/webhook
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public_key_path = File.join("#{$config['certpath']}", "#{$config['certname']}-c
private_key_path = File.join("#{$config['certpath']}", "#{$config['certname']}-private.pem")

opts = {
:Host => $config['bind_address'],
:Port => $config['port'],
:Logger => $logger,
:ServerType => WEBrick::Daemon,
Expand Down
7 changes: 6 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class r10k::params
{
$package_name = ''
$version = '1.4.0'
$version = '1.4.1'
$manage_modulepath = false
$manage_ruby_dependency = 'declare'
$install_options = []
Expand Down Expand Up @@ -33,6 +33,7 @@
# Webhook configuration information
$webhook_user = 'puppet'
$webhook_pass = 'puppet'
$webhook_bind_address = '0.0.0.0'
$webhook_port = '8088'
$webhook_access_logfile = '/var/log/webhook/access.log'
$webhook_mco_logfile = '/var/log/webhook/mco_output.log'
Expand Down Expand Up @@ -82,6 +83,10 @@
$plugins_dir = '/usr/libexec/mcollective/mcollective'
$provider = 'portage'
}
'suse': {
$plugins_dir = '/usr/share/mcollective/plugins/mcollective'
$provider = 'zypper'
}
default: {
$plugins_dir = '/usr/libexec/mcollective/mcollective'
$provider = 'gem'
Expand Down
26 changes: 11 additions & 15 deletions manifests/webhook.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,7 @@
path => '/usr/local/bin/webhook',
notify => Service['webhook'],
}

# 3.7 does not place the certificate in peadmin's ~
# This places it there as if it was an upgrade
file { '/var/lib/peadmin/.mcollective.d/peadmin-cert.pem':
ensure => 'file',
owner => 'peadmin',
group => 'peadmin',
mode => '0644',
content => file('/etc/puppetlabs/puppet/ssl/certs/pe-internal-peadmin-mcollective-client.pem'),
}



service { 'webhook':
ensure => 'running',
enable => true,
Expand All @@ -71,8 +60,15 @@
provider => 'pe_gem',
}
}
# 3.7 does not place the certificate in peadmin's ~
# This places it there as if it was an upgrade
file { 'peadmin-cert.pem':
path => '/var/lib/peadmin/.mcollective.d/peadmin-cert.pem',
ensure => 'file',
owner => 'peadmin',
group => 'peadmin',
mode => '0644',
content => file('/etc/puppetlabs/puppet/ssl/certs/pe-internal-peadmin-mcollective-client.pem'),
}
}



}
2 changes: 2 additions & 0 deletions manifests/webhook/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
$certpath = $r10k::params::webhook_certpath,
$user = $r10k::params::webhook_user,
$pass = $r10k::params::webhook_pass,
$bind_address = $r10k::params::webhook_bind_address,
$port = $r10k::params::webhook_port,
$access_logfile = $r10k::params::webhook_access_logfile,
$mco_logfile = $r10k::params::webhook_mco_logfile,
Expand All @@ -30,6 +31,7 @@
$webhook_hash = {
'user' => $user,
'pass' => $pass,
'bind_address' => $bind_address,
'port' => $port,
'certname' => $certname,
'client_timeout' => $client_timeout,
Expand Down
50 changes: 50 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"author": "Zach Smith",
"license": "Apache License, Version 2.0",
"name": "zack-r10k",
"operatingsystem_support": [],
"project_page": "https://github.com/acidprime/r10k",
"requirements": [],
"source": "https://github.com/acidprime/r10k",
"summary": "Module for setting up dynamic environments using r10k",
"tags": ["git", "pe", "environment", "mcollective"],
"version": "2.6.0",
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 3.2.0"
},
{
"name": "puppetlabs/ruby",
"version_requirement": ">= 0.0.2"
},
{
"name": "puppetlabs/gcc",
"version_requirement": ">= 0.0.3"
},
{
"name": "puppetlabs/pe_gem",
"version_requirement": ">= 0.0.1"
},
{
"name": "croddy/make",
"version_requirement": ">= 0.0.3"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 1.0.0"
},
{
"name": "puppetlabs/vcsrepo",
"version_requirement": ">= 0.1.2"
},
{
"name": "puppetlabs/git",
"version_requirement": ">= 0.0.3"
},
{
"name": "gentoo/portage",
"version_requirement": ">= 2.0.0"
}
]
}
12 changes: 12 additions & 0 deletions spec/classes/webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
'ensure' => 'present',
)
}
it { should contain_file("rack").with(
'path' => '/var/lib/peadmin/.mcollective.d/peadmin-cert.pem',
'ensure' => 'file',
'owner' => 'peadmin',
'group' => 'peadmin',
'mode' => '0644',
)
}
end
context "Puppet Enterprise 3.3.x on a RedHat 5 installing webhook" do
let :facts do
Expand All @@ -44,5 +52,9 @@
'ensure' => 'present',
)
}
it { should_not contain_file('peadmin-cert.pem').with(
'path' => '/var/lib/peadmin/.mcollective.d/peadmin-cert.pem',
)
}
end
end