From 887b4845115e4333a940828fd3080a86eabb708c Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Fri, 23 Jul 2021 13:11:28 +0000 Subject: [PATCH] Add hammer plugin for foreman_webhooks --- manifests/cli/webhooks.pp | 10 ++++++++++ spec/acceptance/foreman_cli_plugins_spec.rb | 3 ++- spec/classes/cli_plugins_spec.rb | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 manifests/cli/webhooks.pp diff --git a/manifests/cli/webhooks.pp b/manifests/cli/webhooks.pp new file mode 100644 index 000000000..7cda5bef7 --- /dev/null +++ b/manifests/cli/webhooks.pp @@ -0,0 +1,10 @@ +# = Hammer Webhooks plugin +# +# This installs the Webhooks plugin for Hammer CLI +# +# === Parameters: +# +class foreman::cli::webhooks { + foreman::cli::plugin { 'foreman_webhooks': + } +} diff --git a/spec/acceptance/foreman_cli_plugins_spec.rb b/spec/acceptance/foreman_cli_plugins_spec.rb index fff1a7d20..ef61652a5 100644 --- a/spec/acceptance/foreman_cli_plugins_spec.rb +++ b/spec/acceptance/foreman_cli_plugins_spec.rb @@ -24,13 +24,14 @@ class { 'foreman::cli': include foreman::cli::remote_execution include foreman::cli::tasks include foreman::cli::templates + include foreman::cli::webhooks PUPPET end end it_behaves_like 'hammer' - ['discovery', 'remote_execution', 'tasks', 'templates'].each do |plugin| + ['discovery', 'remote_execution', 'tasks', 'templates', 'webhooks'].each do |plugin| package_name = case fact('os.family') when 'RedHat' "#{package_prefix}rubygem-hammer_cli_foreman_#{plugin}" diff --git a/spec/classes/cli_plugins_spec.rb b/spec/classes/cli_plugins_spec.rb index 7b06692eb..c0a73906e 100644 --- a/spec/classes/cli_plugins_spec.rb +++ b/spec/classes/cli_plugins_spec.rb @@ -2,7 +2,7 @@ supported = on_supported_os -['ansible', 'azure', 'discovery', 'katello', 'kubevirt', 'openscap', 'remote_execution', 'tasks', 'templates', 'virt_who_configure'].each do |plugin| +['ansible', 'azure', 'discovery', 'katello', 'kubevirt', 'openscap', 'remote_execution', 'tasks', 'templates', 'virt_who_configure', 'webhooks'].each do |plugin| describe "foreman::cli::#{plugin}" do supported.each do |os, os_facts| context "on #{os}" do