Skip to content

Commit 2934855

Browse files
ehelmsevgeni
authored andcommitted
Add parameter to enable iop-advisor-engine to rh_cloud plugin
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
1 parent 02f7e5e commit 2934855

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.fixtures.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ fixtures:
33
apache: 'https://github.com/puppetlabs/puppetlabs-apache'
44
apt: 'https://github.com/puppetlabs/puppetlabs-apt'
55
augeas_core: 'https://github.com/puppetlabs/puppetlabs-augeas_core'
6+
certs: 'https://github.com/theforeman/puppet-certs'
67
concat: 'https://github.com/puppetlabs/puppetlabs-concat'
78
cron_core: 'https://github.com/puppetlabs/puppetlabs-cron_core'
89
extlib: 'https://github.com/voxpupuli/puppet-extlib'
10+
hashfile: 'https://github.com/southalc/hashfile'
11+
iop_advisor_engine: 'https://github.com/theforeman/puppet-iop_advisor_engine'
12+
podman: 'https://github.com/southalc/podman'
913
postgresql: 'https://github.com/puppetlabs/puppetlabs-postgresql'
1014
puppet: 'https://github.com/theforeman/puppet-puppet'
1115
redis: 'https://github.com/voxpupuli/puppet-redis'

manifests/plugin/rh_cloud.pp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
# Installs rh_cloud plugin
2-
class foreman::plugin::rh_cloud {
1+
# @summary Installs rh_cloud plugin
2+
#
3+
# @param enable_iop_advisor_engine
4+
# Enable iop-advisor-engine integration
5+
#
6+
class foreman::plugin::rh_cloud (
7+
Boolean $enable_iop_advisor_engine = false,
8+
) {
39
foreman::plugin { 'rh_cloud':
410
}
11+
12+
class { 'iop_advisor_engine':
13+
ensure => bool2str($enable_iop_advisor_engine, 'present', 'absent'),
14+
}
515
}

spec/acceptance/foreman_rh_cloud_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
it_behaves_like 'an idempotent resource' do
77
let(:manifest) do
88
<<-PUPPET
9+
file { '/etc/foreman-proxy':
10+
ensure => directory,
11+
}
12+
13+
group { 'foreman-proxy':
14+
ensure => present,
15+
}
16+
917
include foreman
1018
include foreman::plugin::rh_cloud
1119
PUPPET

0 commit comments

Comments
 (0)