Skip to content

Commit

Permalink
Add parameter to enable iop-advisor-engine to rh_cloud plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Eric D. Helms <[email protected]>
  • Loading branch information
ehelms authored and evgeni committed Jan 24, 2025
1 parent 02f7e5e commit 2934855
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ fixtures:
apache: 'https://github.com/puppetlabs/puppetlabs-apache'
apt: 'https://github.com/puppetlabs/puppetlabs-apt'
augeas_core: 'https://github.com/puppetlabs/puppetlabs-augeas_core'
certs: 'https://github.com/theforeman/puppet-certs'
concat: 'https://github.com/puppetlabs/puppetlabs-concat'
cron_core: 'https://github.com/puppetlabs/puppetlabs-cron_core'
extlib: 'https://github.com/voxpupuli/puppet-extlib'
hashfile: 'https://github.com/southalc/hashfile'
iop_advisor_engine: 'https://github.com/theforeman/puppet-iop_advisor_engine'
podman: 'https://github.com/southalc/podman'
postgresql: 'https://github.com/puppetlabs/puppetlabs-postgresql'
puppet: 'https://github.com/theforeman/puppet-puppet'
redis: 'https://github.com/voxpupuli/puppet-redis'
Expand Down
14 changes: 12 additions & 2 deletions manifests/plugin/rh_cloud.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Installs rh_cloud plugin
class foreman::plugin::rh_cloud {
# @summary Installs rh_cloud plugin
#
# @param enable_iop_advisor_engine
# Enable iop-advisor-engine integration
#
class foreman::plugin::rh_cloud (
Boolean $enable_iop_advisor_engine = false,
) {
foreman::plugin { 'rh_cloud':
}

class { 'iop_advisor_engine':
ensure => bool2str($enable_iop_advisor_engine, 'present', 'absent'),
}
}
8 changes: 8 additions & 0 deletions spec/acceptance/foreman_rh_cloud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
file { '/etc/foreman-proxy':
ensure => directory,
}
group { 'foreman-proxy':
ensure => present,
}
include foreman
include foreman::plugin::rh_cloud
PUPPET
Expand Down

0 comments on commit 2934855

Please sign in to comment.