Skip to content

Commit

Permalink
Add ACD plugin support
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernhard authored and ekohl committed Jun 11, 2021
1 parent 62a96f7 commit 2f5f2f0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
27 changes: 27 additions & 0 deletions manifests/plugin/acd.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# = Foreman Proxy ACD plugin
#
# This class installs the ACD plugin
#
# === Parameters:
#
# === Advanced parameters:
#
# $enabled:: enables/disables the acd plugin
#
# $listen_on:: proxy feature listens on http, https, or both
#
# $version:: plugin package version, it's passed to ensure parameter of package resource
# can be set to specific version number, 'latest', 'present' etc.
#
class foreman_proxy::plugin::acd (
Optional[String] $version = undef,
Boolean $enabled = true,
Foreman_proxy::ListenOn $listen_on = 'https',
) {
foreman_proxy::plugin::module { 'acd':
enabled => $enabled,
feature => 'ACD',
listen_on => $listen_on,
version => $version,
}
}
20 changes: 20 additions & 0 deletions spec/classes/foreman_proxy__plugin__acd_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require 'spec_helper'

describe 'foreman_proxy::plugin::acd' do
on_plugin_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }
let(:pre_condition) { 'include foreman_proxy' }

describe 'with default settings' do
it { should contain_foreman_proxy__plugin__module('acd') }
it 'acd.yml should contain the correct configuration' do
verify_exact_contents(catalogue, '/etc/foreman-proxy/settings.d/acd.yml', [
'---',
':enabled: https',
])
end
end
end
end
end
2 changes: 2 additions & 0 deletions templates/plugin/acd.yml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
:enabled: <%= @module_enabled %>

0 comments on commit 2f5f2f0

Please sign in to comment.