Merge pull request #156 from ajroetker/maint_prune_old_pe_code
(maint) Prune dead PE code
This commit is contained in:
commit
e56eb99146
3 changed files with 43 additions and 90 deletions
|
@ -72,58 +72,33 @@ class puppetdb::params {
|
|||
}
|
||||
}
|
||||
|
||||
if defined('$is_pe') and str2bool($::is_pe) == true {
|
||||
$puppetdb_package = 'pe-puppetdb'
|
||||
$puppetdb_service = 'pe-puppetdb'
|
||||
$puppetdb_user = 'pe-puppetdb'
|
||||
$puppetdb_group = 'pe-puppetdb'
|
||||
$confdir = '/etc/puppetlabs/puppetdb/conf.d'
|
||||
$puppet_service_name = 'pe-httpd'
|
||||
$puppet_confdir = '/etc/puppetlabs/puppet'
|
||||
$terminus_package = 'pe-puppetdb-terminus'
|
||||
$embedded_subname = 'file:/opt/puppet/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
$ssl_dir = '/etc/puppetlabs/puppetdb/ssl'
|
||||
$puppetdb_package = 'puppetdb'
|
||||
$puppetdb_service = 'puppetdb'
|
||||
$puppetdb_user = 'puppetdb'
|
||||
$puppetdb_group = 'puppetdb'
|
||||
$confdir = '/etc/puppetdb/conf.d'
|
||||
$puppet_confdir = '/etc/puppet'
|
||||
$terminus_package = 'puppetdb-terminus'
|
||||
$ssl_dir = '/etc/puppetdb/ssl'
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat', 'Suse': {
|
||||
$puppetdb_initconf = '/etc/sysconfig/pe-puppetdb'
|
||||
}
|
||||
'Debian': {
|
||||
$puppetdb_initconf = '/etc/default/pe-puppetdb'
|
||||
}
|
||||
default: {
|
||||
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
||||
}
|
||||
case $::osfamily {
|
||||
'RedHat', 'Suse', 'Archlinux': {
|
||||
$puppetdb_initconf = '/etc/sysconfig/puppetdb'
|
||||
$puppet_service_name = 'puppetmaster'
|
||||
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
} else {
|
||||
$puppetdb_package = 'puppetdb'
|
||||
$puppetdb_service = 'puppetdb'
|
||||
$puppetdb_user = 'puppetdb'
|
||||
$puppetdb_group = 'puppetdb'
|
||||
$confdir = '/etc/puppetdb/conf.d'
|
||||
$puppet_confdir = '/etc/puppet'
|
||||
$terminus_package = 'puppetdb-terminus'
|
||||
$ssl_dir = '/etc/puppetdb/ssl'
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat', 'Suse', 'Archlinux': {
|
||||
$puppetdb_initconf = '/etc/sysconfig/puppetdb'
|
||||
$puppet_service_name = 'puppetmaster'
|
||||
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
'Debian': {
|
||||
$puppetdb_initconf = '/etc/default/puppetdb'
|
||||
$puppet_service_name = 'puppetmaster'
|
||||
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
'OpenBSD': {
|
||||
$puppetdb_initconf = undef
|
||||
$puppet_service_name = 'puppetmasterd'
|
||||
$embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
default: {
|
||||
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
||||
}
|
||||
'Debian': {
|
||||
$puppetdb_initconf = '/etc/default/puppetdb'
|
||||
$puppet_service_name = 'puppetmaster'
|
||||
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
'OpenBSD': {
|
||||
$puppetdb_initconf = undef
|
||||
$puppet_service_name = 'puppetmasterd'
|
||||
$embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
||||
}
|
||||
default: {
|
||||
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,29 +5,25 @@ hosts.each do |host|
|
|||
if host['platform'] =~ /debian/
|
||||
on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
|
||||
end
|
||||
if host.is_pe?
|
||||
install_pe
|
||||
else
|
||||
#install_puppet
|
||||
if host['platform'] =~ /el-(5|6)/
|
||||
relver = $1
|
||||
on host, "rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-#{relver}.noarch.rpm"
|
||||
on host, 'yum install -y puppet puppet-server'
|
||||
elsif host['platform'] =~ /fedora-(\d+)/
|
||||
relver = $1
|
||||
on host, "rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-fedora-#{relver}.noarch.rpm"
|
||||
on host, 'yum install -y puppet-server'
|
||||
elsif host['platform'] =~ /(ubuntu|debian)/
|
||||
if ! host.check_for_package 'curl'
|
||||
on host, 'apt-get install -y curl'
|
||||
end
|
||||
on host, 'curl -O http://apt.puppetlabs.com/puppetlabs-release-$(lsb_release -c -s).deb'
|
||||
on host, 'dpkg -i puppetlabs-release-$(lsb_release -c -s).deb'
|
||||
on host, 'apt-get -y -f -m update'
|
||||
on host, 'apt-get install -y puppet puppetmaster'
|
||||
else
|
||||
raise "install_puppet() called for unsupported platform '#{host['platform']}' on '#{host.name}'"
|
||||
#install_puppet
|
||||
if host['platform'] =~ /el-(5|6)/
|
||||
relver = $1
|
||||
on host, "rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-#{relver}.noarch.rpm"
|
||||
on host, 'yum install -y puppet puppet-server'
|
||||
elsif host['platform'] =~ /fedora-(\d+)/
|
||||
relver = $1
|
||||
on host, "rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-fedora-#{relver}.noarch.rpm"
|
||||
on host, 'yum install -y puppet-server'
|
||||
elsif host['platform'] =~ /(ubuntu|debian)/
|
||||
if ! host.check_for_package 'curl'
|
||||
on host, 'apt-get install -y curl'
|
||||
end
|
||||
on host, 'curl -O http://apt.puppetlabs.com/puppetlabs-release-$(lsb_release -c -s).deb'
|
||||
on host, 'dpkg -i puppetlabs-release-$(lsb_release -c -s).deb'
|
||||
on host, 'apt-get -y -f -m update'
|
||||
on host, 'apt-get install -y puppet puppetmaster'
|
||||
else
|
||||
raise "install_puppet() called for unsupported platform '#{host['platform']}' on '#{host.name}'"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -42,24 +42,6 @@ describe 'puppetdb::server', :type => :class do
|
|||
)}
|
||||
end
|
||||
|
||||
context 'on PE PuppetDB' do
|
||||
let(:facts) do
|
||||
basefacts.merge({
|
||||
:is_pe => 'true',
|
||||
})
|
||||
end
|
||||
it { should contain_ini_subsetting("'-Xms'").
|
||||
with(
|
||||
'ensure' => 'present',
|
||||
'path' => '/etc/sysconfig/pe-puppetdb',
|
||||
'section' => '',
|
||||
'key_val_separator' => '=',
|
||||
'setting' => 'JAVA_ARGS',
|
||||
'subsetting' => '-Xms',
|
||||
'value' => '2g'
|
||||
)}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue