Revision b22f96ff
Added by Ewoud Kohl van Wijngaarden over 10 years ago
.fixtures.yml | ||
---|---|---|
repo: 'git://github.com/ripienaar/puppet-concat'
|
||
ref: '04356974f72b90a1d0f57346a00e95a717924e43'
|
||
concat_native: 'git://github.com/theforeman/puppet-concat'
|
||
create_resources: 'git://github.com/puppetlabs/puppetlabs-create_resources'
|
||
mysql:
|
||
repo: 'git://github.com/puppetlabs/puppetlabs-mysql'
|
||
ref: '52fb70ebdeb74f66bedc54196c0884c2b84699f3'
|
||
passenger: 'git://github.com/theforeman/puppet-passenger'
|
||
postgresql:
|
||
repo: 'git://github.com/puppetlabs/puppetlabs-postgresql'
|
||
ref: 'efb5daae5dc66da9e6ebfe21d1f09fb763e9a0f8'
|
||
postgresql: 'git://github.com/puppetlabs/puppetlabs-postgresql'
|
||
puppet: 'git://github.com/theforeman/puppet-puppet'
|
||
stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib'
|
||
|
.travis.yml | ||
---|---|---|
- 1.9.3
|
||
- 2.0.0
|
||
env:
|
||
- PUPPET_VERSION=2.6.0
|
||
- PUPPET_VERSION=2.7.0
|
||
- PUPPET_VERSION=3.2.0
|
||
- PUPPET_VERSION=3.3
|
||
matrix:
|
||
exclude:
|
||
# No support for Ruby 1.9 before Puppet 2.7
|
||
- rvm: 1.9.3
|
||
env: PUPPET_VERSION=2.6.0
|
||
# No support VERSIONfor Ruby 2.0 before Puppet 3.2
|
||
- rvm: 2.0.0
|
||
env: PUPPET_VERSION=2.6.0
|
||
# No support for Ruby 2.0 before Puppet 3.2
|
||
- rvm: 2.0.0
|
||
env: PUPPET_VERSION=2.7.0
|
Modulefile | ||
---|---|---|
dependency 'theforeman/concat_native', '>= 1.3.0'
|
||
dependency 'theforeman/passenger', '>= 1.3.0'
|
||
|
||
dependency 'puppetlabs/postgresql', '>= 2.2.0'
|
||
dependency 'puppetlabs/postgresql', '>= 3.0.0'
|
||
dependency 'puppetlabs/stdlib'
|
manifests/database/postgresql.pp | ||
---|---|---|
cwd => '/',
|
||
}
|
||
|
||
include postgresql::client, postgresql::server, postgresql::params
|
||
|
||
if ! defined(Postgresql::Database_user[$foreman::db_username]) {
|
||
postgresql::database_user { $foreman::db_username:
|
||
password_hash => $password,
|
||
require => Class['postgresql::server'],
|
||
before => Postgresql::Database[$dbname],
|
||
}
|
||
}
|
||
|
||
$grant = 'ALL'
|
||
# TODO copied from puppetlabs-postgresql 2.3.0 manifests/db.pp
|
||
# should be removed by db once they expose owner parameter
|
||
postgresql::database { $dbname:
|
||
charset => $postgresql::params::charset,
|
||
tablespace => undef,
|
||
require => Class['postgresql::server'],
|
||
locale => $postgresql::params::locale,
|
||
owner => $foreman::db_username,
|
||
include postgresql::client, postgresql::server
|
||
postgresql::server::db { $dbname:
|
||
user => $foreman::db_username,
|
||
password => $password,
|
||
owner => $foreman::db_username,
|
||
}
|
||
|
||
postgresql::database_grant { "GRANT ${$foreman::db_username} - ${grant} - ${dbname}":
|
||
privilege => $grant,
|
||
db => $dbname,
|
||
role => $foreman::db_username,
|
||
require => [Postgresql::Database[$dbname], Postgresql::Database_user[$foreman::db_username]],
|
||
}
|
||
Postgresql::Server::Role[$foreman::db_username] -> Postgresql::Server::Database[$dbname]
|
||
}
|
spec/classes/foreman_config_passenger_spec.rb | ||
---|---|---|
describe 'foreman::config::passenger' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => 'lo',
|
||
:ipaddress_lo => '127.0.0.1',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => 'lo',
|
||
:ipaddress_lo => '127.0.0.1',
|
||
}
|
||
end
|
||
|
||
context 'on redhat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
spec/classes/foreman_config_spec.rb | ||
---|---|---|
describe 'foreman::config' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
||
context 'on redhat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'on debian' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'Debian',
|
||
:osfamily => 'Debian',
|
||
:operatingsystem => 'Debian',
|
||
:operatingsystemrelease => 'wheezy',
|
||
:osfamily => 'Debian',
|
||
})
|
||
end
|
||
|
spec/classes/foreman_database_spec.rb | ||
---|---|---|
describe 'foreman::install' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
||
context 'RedHat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'on debian' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'Debian',
|
||
:osfamily => 'Debian',
|
||
:operatingsystem => 'Debian',
|
||
:operatingsystemrelease => 'wheezy',
|
||
:osfamily => 'Debian',
|
||
})
|
||
end
|
||
|
spec/classes/foreman_install_spec.rb | ||
---|---|---|
describe 'foreman::install' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
||
context 'RedHat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'with SELinux enabled' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:selinux => 'true',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
:selinux => 'true',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'with SELinux disabled' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:selinux => 'false',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
:selinux => 'false',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'on debian' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'Debian',
|
||
:osfamily => 'Debian',
|
||
:operatingsystem => 'Debian',
|
||
:operatingsystemrelease => 'wheezy',
|
||
:osfamily => 'Debian',
|
||
})
|
||
end
|
||
|
spec/classes/foreman_plugin_puppetdb_spec.rb | ||
---|---|---|
should contain_foreman__plugin('puppetdb').with_package('ruby-puppetdb_foreman')
|
||
end
|
||
end
|
||
|
spec/classes/foreman_service_spec.rb | ||
---|---|---|
describe 'foreman::install' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
||
context 'RedHat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
spec/classes/foreman_spec.rb | ||
---|---|---|
describe 'foreman' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
||
context 'on redhat' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'RedHat',
|
||
:osfamily => 'RedHat',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
})
|
||
end
|
||
|
||
... | ... | |
context 'on debian' do
|
||
let :facts do
|
||
default_facts.merge({
|
||
:operatingsystem => 'Debian',
|
||
:osfamily => 'Debian',
|
||
:operatingsystem => 'Debian',
|
||
:operatingsystemrelease => 'wheezy',
|
||
:osfamily => 'Debian',
|
||
})
|
||
end
|
||
|
spec/defines/foreman_plugin_spec.rb | ||
---|---|---|
end
|
||
|
||
let :facts do {
|
||
:concat_basedir => '/nonexistant',
|
||
:osfamily => 'RedHat',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/nonexistant',
|
||
:operatingsystem => 'RedHat',
|
||
:operatingsystemrelease => '6.4',
|
||
:osfamily => 'RedHat',
|
||
} end
|
||
|
||
it 'should install the correct package with notify' do
|
spec/defines/foreman_rake_spec.rb | ||
---|---|---|
describe 'foreman::rake' do
|
||
let :default_facts do
|
||
{
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
:postgres_default_version => '8.4',
|
||
:concat_basedir => '/tmp',
|
||
:interfaces => '',
|
||
}
|
||
end
|
||
|
Also available in: Unified diff
Work with puppetlabs-postgresql version 3+
This drops support for puppet 2.6.