3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# https://github.com/theforeman/foreman-installer-modulesync
rvm:
- 2.1.9
- 2.2.6
- 2.3.0
- 2.4.1
env:
Expand All @@ -16,6 +15,8 @@ matrix:
include:
- rvm: 2.4.1
env: PUPPET_VERSION=5.0
- rvm: 2.5.1
env: PUPPET_VERSION=5.0
# Acceptance tests
- rvm: 2.3.1
dist: trusty
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Changelog

## [9.1.0](https://github.com/theforeman/puppet-foreman/tree/9.1.0) (2018-05-09)
## [9.2.0](https://github.com/theforeman/puppet-foreman/tree/9.2.0) (2018-07-10)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/9.1.0...9.2.0)

**Implemented enhancements:**

- Adding rescue plugin [\#648](https://github.com/theforeman/puppet-foreman/pull/648) ([cocker-cc](https://github.com/cocker-cc))
- Adding wreckingball Plugin [\#647](https://github.com/theforeman/puppet-foreman/pull/647) ([cocker-cc](https://github.com/cocker-cc))
- Adding dlm plugin [\#646](https://github.com/theforeman/puppet-foreman/pull/646) ([cocker-cc](https://github.com/cocker-cc))
- Adding spacewalk plugin [\#645](https://github.com/theforeman/puppet-foreman/pull/645) ([cocker-cc](https://github.com/cocker-cc))
- Add support for foreman\_virt\_who\_configure [\#642](https://github.com/theforeman/puppet-foreman/pull/642) ([ekohl](https://github.com/ekohl))

**Fixed bugs:**

- Fixes [\#22940](https://projects.theforeman.org/issues/22940) - Ensure the PG root cert is installed [\#650](https://github.com/theforeman/puppet-foreman/pull/650) ([ekohl](https://github.com/ekohl))

**Merged pull requests:**

- support Ubuntu/bionic [\#651](https://github.com/theforeman/puppet-foreman/pull/651) ([mmoll](https://github.com/mmoll))

## [9.1.0](https://github.com/theforeman/puppet-foreman/tree/9.1.0) (2018-05-29)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/9.0.1...9.1.0)

Expand Down
10 changes: 10 additions & 0 deletions manifests/cli/virt_who_configure.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# = Hammer Virt Who Configure plugin
#
# This installs the Virt Who Configure plugin for Hammer CLI
#
# === Parameters:
#
class foreman::cli::virt_who_configure {
foreman::cli::plugin { 'foreman_virt_who_configure':
}
}
19 changes: 19 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@
ensure => directory,
}

if $::foreman::db_root_cert and $::foreman::db_type == 'postgresql' {
$pg_cert_dir = "${::foreman::app_root}/.postgresql"

file { $pg_cert_dir:
ensure => 'directory',
owner => 'root',
group => $::foreman::group,
mode => '0640',
}

file { "${pg_cert_dir}/root.crt":
ensure => file,
source => $::foreman::db_root_cert,
owner => 'root',
group => $::foreman::group,
mode => '0640',
}
}

if $::foreman::manage_user {
user { $::foreman::user:
ensure => 'present',
Expand Down
19 changes: 0 additions & 19 deletions manifests/database/postgresql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@
default => postgresql_password($::foreman::db_username, $::foreman::db_password),
}

if $::foreman::db_root_cert {
$pg_cert_dir = "${::foreman::app_root}/.postgresql"

file { $pg_cert_dir:
ensure => 'directory',
owner => 'root',
group => $::foreman::group,
mode => '0640',
}

file { "${pg_cert_dir}/root.crt":
ensure => file,
source => $::foreman::db_root_cert,
owner => 'root',
group => $::foreman::group,
mode => '0640',
}
}

# Prevents errors if run from /root etc.
Postgresql_psql {
cwd => '/',
Expand Down
5 changes: 5 additions & 0 deletions manifests/plugin/dlm.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installs foreman_dlm plugin
class foreman::plugin::dlm {
foreman::plugin {'dlm':
}
}
5 changes: 5 additions & 0 deletions manifests/plugin/rescue.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installs foreman_rescue plugin
class foreman::plugin::rescue {
foreman::plugin {'rescue':
}
}
5 changes: 5 additions & 0 deletions manifests/plugin/spacewalk.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installs foreman_spacewalk plugin
class foreman::plugin::spacewalk {
foreman::plugin {'spacewalk':
}
}
5 changes: 5 additions & 0 deletions manifests/plugin/virt_who_configure.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installs foreman_virt_who_configure plugin
class foreman::plugin::virt_who_configure {
foreman::plugin { 'virt_who_configure':
}
}
5 changes: 5 additions & 0 deletions manifests/plugin/wreckingball.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installs foreman_wreckingball plugin
class foreman::plugin::wreckingball {
foreman::plugin {'wreckingball':
}
}
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-foreman",
"version": "9.1.0",
"version": "9.2.0",
"author": "theforeman",
"summary": "Foreman server configuration",
"license": "GPL-3.0+",
Expand Down Expand Up @@ -72,7 +72,8 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04"
"16.04",
"18.04"
]
}
]
Expand Down
23 changes: 23 additions & 0 deletions spec/classes/foreman_cli_virt_who_configure_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'spec_helper'

describe 'foreman::cli::virt_who_configure' do
context 'on redhat-7-x86_64' do
let(:facts) do
on_supported_os['redhat-7-x86_64']
end

let(:pre_condition) { 'include foreman::cli' }

it { should contain_package('tfm-rubygem-hammer_cli_foreman_virt_who_configure') }
end

context 'on debian-9-x86_64' do
let(:facts) do
on_supported_os['debian-9-x86_64']
end

let(:pre_condition) { 'include foreman::cli' }

it { should contain_package('ruby-hammer-cli-foreman-virt-who-configure') }
end
end
5 changes: 5 additions & 0 deletions spec/classes/plugin/dlm_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::dlm' do
include_examples 'basic foreman plugin tests', 'dlm'
end
5 changes: 5 additions & 0 deletions spec/classes/plugin/rescue_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::rescue' do
include_examples 'basic foreman plugin tests', 'rescue'
end
5 changes: 5 additions & 0 deletions spec/classes/plugin/spacewalk_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::spacewalk' do
include_examples 'basic foreman plugin tests', 'spacewalk'
end
5 changes: 5 additions & 0 deletions spec/classes/plugin/virt_who_configure_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::virt_who_configure' do
include_examples 'basic foreman plugin tests', 'virt_who_configure'
end
5 changes: 5 additions & 0 deletions spec/classes/plugin/wreckingball_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::wreckingball' do
include_examples 'basic foreman plugin tests', 'wreckingball'
end