Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fixtures:
apache: "git://github.com/puppetlabs/puppetlabs-apache.git"
portage: "git://github.com/gentoo/puppet-portage.git"
thin: "git://github.com/danieldreier/puppet-thin.git"
puppetdb: "https://github.com/puppetlabs/puppetlabs-puppetdb.git"
symlinks:
puppet: "#{source_dir}"

1 change: 1 addition & 0 deletions Modulefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dependency 'puppetlabs/apache', '>= 0.9.0'
dependency 'gentoo/portage', '>= 2.1.0'
dependency 'jfryman/nginx', '<= 0.0.10'
dependency 'danieldreier/thin'
dependency 'puppetlabs/puppetdb', '>= 4.1.0'
47 changes: 29 additions & 18 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,31 @@
# }
#
class puppet::server (
$modulepath = ['$confdir/modules/site', '$confdir/env/$environment/dist'],
$manifest = '$confdir/modules/site/site.pp',
$environmentpath = undef,
$config_version_cmd = '/usr/bin/git --git-dir $confdir/environments/$environment/.git rev-parse --short HEAD 2>/dev/null || echo',
$storeconfigs = undef,
$report = true,
$reports = ['store', 'https'],
$reporturl = "http://${::fqdn}/reports",
$reportfrom = undef,
$servertype = 'unicorn',
$serverssl_protos = undef,
$serverssl_ciphers = undef,
$ca = false,
$autosign = undef,
$bindaddress = '0.0.0.0',
$ca = false,
$config_version_cmd = '/usr/bin/git --git-dir $confdir/environments/$environment/.git rev-parse --short HEAD 2>/dev/null || echo',
$dns_alt_names = undef,
$enc = '',
$enc_exec = '',
$servername = undef,
$ensure = 'present',
$parser = undef,
$gentoo_use = $puppet::params::master_use,
$environmentpath = undef,
$gentoo_keywords = $puppet::params::master_keywords,
$gentoo_use = $puppet::params::master_use,
$manage_package = true,
$dns_alt_names = undef,
$autosign = undef,
$manifest = '$confdir/modules/site/site.pp',
$modulepath = ['$confdir/modules/site', '$confdir/env/$environment/dist'],
$parser = undef,
$manage_puppetdb = undef,
$report = true,
$reportfrom = undef,
$reports = ['store', 'https'],
$reporturl = "http://${::fqdn}/reports",
$servername = undef,
$serverssl_ciphers = undef,
$serverssl_protos = undef,
$servertype = 'unicorn',
$storeconfigs = undef,
) inherits puppet::params {

$master = true
Expand Down Expand Up @@ -104,9 +105,19 @@
# ---
# Storeconfigs
if $storeconfigs {
notify { 'storeconfigs is deprecated. Use manage_puppetdb setting.': }
class { 'puppet::storeconfig':
backend => $storeconfigs,
}
}

# enable basic puppetdb using the puppetlabs-puppetdb module
# this will also install postgresql
# for more detailed control over puppetdb settings, use the puppetdb
# module directly rather than having puppet-puppet include it.
if $manage_puppetdb == true {
include puppetdb
include puppetdb::master::config
}

}
18 changes: 18 additions & 0 deletions tests/unicorn_with_puppetdb.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class { '::puppet::server':
modulepath => [
'$confdir/modules',
'$confdir/environments/$environment/modules/site',
'$confdir/environments/$environment/modules/site/dist',
'$confdir/environments/$environment/modules/site/dist',
],
manage_puppetdb => true,
reporturl => "https://${::fqdn}/reports",
servertype => 'unicorn',
manifest => '$confdir/environments/$environment/site.pp',
ca => true,
reports => [
'https',
'store',
'puppetdb',
],
}