diff --git a/manifests/plugin/acd.pp b/manifests/plugin/acd.pp index 17611b66..360da9c3 100644 --- a/manifests/plugin/acd.pp +++ b/manifests/plugin/acd.pp @@ -1,8 +1,16 @@ # Installs foreman_acd plugin -class foreman::plugin::acd { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::acd ( + Optional[String[1]] $ensure = undef, +) { include foreman::plugin::tasks include foreman::plugin::remote_execution foreman::plugin { 'acd': + version => $ensure, } } diff --git a/manifests/plugin/ansible.pp b/manifests/plugin/ansible.pp index 28b0b9f9..3a80fb40 100644 --- a/manifests/plugin/ansible.pp +++ b/manifests/plugin/ansible.pp @@ -1,7 +1,15 @@ # Installs foreman_ansible plugin -class foreman::plugin::ansible { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::ansible ( + Optional[String[1]] $ensure = undef, +) { include foreman::plugin::tasks foreman::plugin { 'ansible': + version => $ensure, } } diff --git a/manifests/plugin/azure.pp b/manifests/plugin/azure.pp index 36506175..ed0ab157 100644 --- a/manifests/plugin/azure.pp +++ b/manifests/plugin/azure.pp @@ -1,5 +1,13 @@ # Installs foreman_azure_rm plugin -class foreman::plugin::azure { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::azure ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'azure_rm': + version => $ensure, } } diff --git a/manifests/plugin/bootdisk.pp b/manifests/plugin/bootdisk.pp index 098e8207..663a5ab0 100644 --- a/manifests/plugin/bootdisk.pp +++ b/manifests/plugin/bootdisk.pp @@ -1,5 +1,13 @@ # Installs foreman_bootdisk plugin -class foreman::plugin::bootdisk { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::bootdisk ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'bootdisk': + version => $ensure, } } diff --git a/manifests/plugin/datacenter.pp b/manifests/plugin/datacenter.pp index 5009e809..b0c7e891 100644 --- a/manifests/plugin/datacenter.pp +++ b/manifests/plugin/datacenter.pp @@ -1,4 +1,13 @@ # Installs foreman_datacenter plugin -class foreman::plugin::datacenter { - foreman::plugin { 'datacenter': } +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::datacenter ( + Optional[String[1]] $ensure = undef, +) { + foreman::plugin { 'datacenter': + version => $ensure, + } } diff --git a/manifests/plugin/default_hostgroup.pp b/manifests/plugin/default_hostgroup.pp index 01ffc66b..e9a093c0 100644 --- a/manifests/plugin/default_hostgroup.pp +++ b/manifests/plugin/default_hostgroup.pp @@ -1,8 +1,10 @@ # @summary This class installs the default_hostgroup plugin and optionally manages the configuration file # # @param hostgroups An array of hashes of hostgroup names and facts to add to the configuration +# @param ensure Specify the package state, or absent/purged to remove it # class foreman::plugin::default_hostgroup ( + Optional[String[1]] $ensure = undef, Array[Hash[String, Hash]] $hostgroups = [], ) { if empty($hostgroups) { @@ -12,6 +14,7 @@ } foreman::plugin { 'default_hostgroup': + version => $ensure, config => $config, config_file => "${foreman::plugin_config_dir}/default_hostgroup.yaml", } diff --git a/manifests/plugin/dhcp_browser.pp b/manifests/plugin/dhcp_browser.pp index 4d1c2d55..34d7d03f 100644 --- a/manifests/plugin/dhcp_browser.pp +++ b/manifests/plugin/dhcp_browser.pp @@ -1,4 +1,13 @@ # Installs foreman_dhcp_browser plugin -class foreman::plugin::dhcp_browser { - foreman::plugin { 'dhcp_browser': } +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::dhcp_browser ( + Optional[String[1]] $ensure = undef, +) { + foreman::plugin { 'dhcp_browser': + version => $ensure, + } } diff --git a/manifests/plugin/discovery.pp b/manifests/plugin/discovery.pp index 78c627d6..a98fdead 100644 --- a/manifests/plugin/discovery.pp +++ b/manifests/plugin/discovery.pp @@ -2,7 +2,15 @@ # # This class installs discovery plugin and images # -class foreman::plugin::discovery { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::discovery ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'discovery': + version => $ensure, } } diff --git a/manifests/plugin/dlm.pp b/manifests/plugin/dlm.pp index 8f60d5d5..06ab4768 100644 --- a/manifests/plugin/dlm.pp +++ b/manifests/plugin/dlm.pp @@ -1,5 +1,13 @@ # Installs foreman_dlm plugin -class foreman::plugin::dlm { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::dlm ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'dlm': + version => $ensure, } } diff --git a/manifests/plugin/expire_hosts.pp b/manifests/plugin/expire_hosts.pp index dafd9992..c7bf7ade 100644 --- a/manifests/plugin/expire_hosts.pp +++ b/manifests/plugin/expire_hosts.pp @@ -1,5 +1,13 @@ # Installs foreman_expire_hosts plugin -class foreman::plugin::expire_hosts { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::expire_hosts ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'expire_hosts': + version => $ensure, } } diff --git a/manifests/plugin/git_templates.pp b/manifests/plugin/git_templates.pp index 6de89feb..406f9015 100644 --- a/manifests/plugin/git_templates.pp +++ b/manifests/plugin/git_templates.pp @@ -2,7 +2,15 @@ # # This class installs git_templates plugin # -class foreman::plugin::git_templates { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::git_templates ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'git_templates': + version => $ensure, } } diff --git a/manifests/plugin/google.pp b/manifests/plugin/google.pp index b7e2e067..67b740a1 100644 --- a/manifests/plugin/google.pp +++ b/manifests/plugin/google.pp @@ -1,5 +1,13 @@ # Installs foreman_google plugin -class foreman::plugin::google { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::google ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'google': + version => $ensure, } } diff --git a/manifests/plugin/hdm.pp b/manifests/plugin/hdm.pp index eadb2057..95cb1604 100644 --- a/manifests/plugin/hdm.pp +++ b/manifests/plugin/hdm.pp @@ -1,6 +1,14 @@ # @summary Install the Hiera Data Manager (HDM) plugin # -class foreman::plugin::hdm { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::hdm ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'hdm': + version => $ensure, } } diff --git a/manifests/plugin/host_extra_validator.pp b/manifests/plugin/host_extra_validator.pp index 6949ae24..d7396a08 100644 --- a/manifests/plugin/host_extra_validator.pp +++ b/manifests/plugin/host_extra_validator.pp @@ -1,5 +1,13 @@ # Installs foreman_host_extra_validator plugin -class foreman::plugin::host_extra_validator { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::host_extra_validator ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'host_extra_validator': + version => $ensure, } } diff --git a/manifests/plugin/kernel_care.pp b/manifests/plugin/kernel_care.pp index 8fbebcea..d46dda29 100644 --- a/manifests/plugin/kernel_care.pp +++ b/manifests/plugin/kernel_care.pp @@ -1,5 +1,13 @@ # Installs foreman_kernel_care plugin -class foreman::plugin::kernel_care { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::kernel_care ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'kernel_care': + version => $ensure, } } diff --git a/manifests/plugin/kubevirt.pp b/manifests/plugin/kubevirt.pp index 7efed74b..32e8c111 100644 --- a/manifests/plugin/kubevirt.pp +++ b/manifests/plugin/kubevirt.pp @@ -1,5 +1,13 @@ # Installs foreman_kubevirt plugin -class foreman::plugin::kubevirt { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::kubevirt ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'kubevirt': + version => $ensure, } } diff --git a/manifests/plugin/leapp.pp b/manifests/plugin/leapp.pp index 8b9d239f..5911c80e 100644 --- a/manifests/plugin/leapp.pp +++ b/manifests/plugin/leapp.pp @@ -1,8 +1,16 @@ # Installs foreman_leapp plugin -class foreman::plugin::leapp { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::leapp ( + Optional[String[1]] $ensure = undef, +) { include foreman::plugin::remote_execution include foreman::plugin::ansible foreman::plugin { 'leapp': + version => $ensure, } } diff --git a/manifests/plugin/monitoring.pp b/manifests/plugin/monitoring.pp index 1162e594..c4f11d70 100644 --- a/manifests/plugin/monitoring.pp +++ b/manifests/plugin/monitoring.pp @@ -1,5 +1,13 @@ # Installs foreman_monitoring plugin -class foreman::plugin::monitoring { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::monitoring ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'monitoring': + version => $ensure, } } diff --git a/manifests/plugin/netbox.pp b/manifests/plugin/netbox.pp index 0789ca7f..cefcdd49 100644 --- a/manifests/plugin/netbox.pp +++ b/manifests/plugin/netbox.pp @@ -2,7 +2,15 @@ # # This class installs netbox plugin # -class foreman::plugin::netbox { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::netbox ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'netbox': + version => $ensure, } } diff --git a/manifests/plugin/omaha.pp b/manifests/plugin/omaha.pp index 9d45e047..3d079da0 100644 --- a/manifests/plugin/omaha.pp +++ b/manifests/plugin/omaha.pp @@ -1,5 +1,13 @@ # Installs foreman_omaha plugin -class foreman::plugin::omaha { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::omaha ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'omaha': + version => $ensure, } } diff --git a/manifests/plugin/openscap.pp b/manifests/plugin/openscap.pp index 2257edb3..2ca3f689 100644 --- a/manifests/plugin/openscap.pp +++ b/manifests/plugin/openscap.pp @@ -4,6 +4,15 @@ # # === Parameters: # -class foreman::plugin::openscap { - foreman::plugin { 'openscap': } +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::openscap ( + Optional[String[1]] $ensure = undef, +) { + foreman::plugin { 'openscap': + version => $ensure, + } } diff --git a/manifests/plugin/ovirt_provision.pp b/manifests/plugin/ovirt_provision.pp index eb12308f..9ccef9f8 100644 --- a/manifests/plugin/ovirt_provision.pp +++ b/manifests/plugin/ovirt_provision.pp @@ -1,6 +1,14 @@ # @summary install the ovirt_provision plugin -class foreman::plugin::ovirt_provision { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::ovirt_provision ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'ovirt_provision': + version => $ensure, package => $foreman::params::plugin_prefix.regsubst(/foreman[_-]/, 'ovirt_provision_plugin'), } } diff --git a/manifests/plugin/proxmox.pp b/manifests/plugin/proxmox.pp index be988364..fa174557 100644 --- a/manifests/plugin/proxmox.pp +++ b/manifests/plugin/proxmox.pp @@ -1,5 +1,13 @@ # = Foreman Proxmox plugin -class foreman::plugin::proxmox { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::proxmox ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'fog_proxmox': + version => $ensure, } } diff --git a/manifests/plugin/puppet.pp b/manifests/plugin/puppet.pp index a46fec40..06672ed0 100644 --- a/manifests/plugin/puppet.pp +++ b/manifests/plugin/puppet.pp @@ -2,7 +2,15 @@ # # This class installs puppet plugin # -class foreman::plugin::puppet { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::puppet ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'puppet': + version => $ensure, } } diff --git a/manifests/plugin/puppetdb.pp b/manifests/plugin/puppetdb.pp index df40da7f..6105853d 100644 --- a/manifests/plugin/puppetdb.pp +++ b/manifests/plugin/puppetdb.pp @@ -15,7 +15,11 @@ # @param api_version # PuppetDB API version. # +# @param ensure +# Specify the package state, or absent/purged to remove it +# class foreman::plugin::puppetdb ( + Optional[String[1]] $ensure = undef, Stdlib::HTTPUrl $address = 'https://localhost:8081/pdb/cmd/v1', String $ssl_ca_file = $foreman::params::client_ssl_ca, String $ssl_certificate = $foreman::params::client_ssl_cert, @@ -23,6 +27,7 @@ Enum['1', '3', '4'] $api_version = '4', ) inherits foreman::params { foreman::plugin { 'puppetdb': + version => $ensure, package => $foreman::params::plugin_prefix.regsubst(/foreman[_-]/, 'puppetdb_foreman'), } diff --git a/manifests/plugin/remote_execution.pp b/manifests/plugin/remote_execution.pp index f82d12ed..d1589e17 100644 --- a/manifests/plugin/remote_execution.pp +++ b/manifests/plugin/remote_execution.pp @@ -1,7 +1,15 @@ # Installs foreman_remote_execution plugin -class foreman::plugin::remote_execution { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::remote_execution ( + Optional[String[1]] $ensure = undef, +) { include foreman::plugin::tasks foreman::plugin { 'remote_execution': + version => $ensure, } } diff --git a/manifests/plugin/rescue.pp b/manifests/plugin/rescue.pp index 8dc5c017..ab0741b7 100644 --- a/manifests/plugin/rescue.pp +++ b/manifests/plugin/rescue.pp @@ -1,5 +1,13 @@ # Installs foreman_rescue plugin -class foreman::plugin::rescue { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::rescue ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'rescue': + version => $ensure, } } diff --git a/manifests/plugin/rh_cloud.pp b/manifests/plugin/rh_cloud.pp index 08f6d5da..0daa8db3 100644 --- a/manifests/plugin/rh_cloud.pp +++ b/manifests/plugin/rh_cloud.pp @@ -1,5 +1,13 @@ # Installs rh_cloud plugin -class foreman::plugin::rh_cloud { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::rh_cloud ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'rh_cloud': + version => $ensure, } } diff --git a/manifests/plugin/salt.pp b/manifests/plugin/salt.pp index 3a76cd93..48a857dd 100644 --- a/manifests/plugin/salt.pp +++ b/manifests/plugin/salt.pp @@ -1,7 +1,15 @@ # Installs foreman_salt plugin -class foreman::plugin::salt { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::salt ( + Optional[String[1]] $ensure = undef, +) { include foreman::plugin::tasks foreman::plugin { 'salt': + version => $ensure, } } diff --git a/manifests/plugin/scc_manager.pp b/manifests/plugin/scc_manager.pp index 8a5d007a..e84c941e 100644 --- a/manifests/plugin/scc_manager.pp +++ b/manifests/plugin/scc_manager.pp @@ -2,7 +2,15 @@ # # This class installs scc_manager plugin # -class foreman::plugin::scc_manager { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::scc_manager ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'scc_manager': + version => $ensure, } } diff --git a/manifests/plugin/snapshot_management.pp b/manifests/plugin/snapshot_management.pp index b836eb65..4c336fcc 100644 --- a/manifests/plugin/snapshot_management.pp +++ b/manifests/plugin/snapshot_management.pp @@ -1,5 +1,13 @@ # Installs foreman_snapshot_management plugin -class foreman::plugin::snapshot_management { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::snapshot_management ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'snapshot_management': + version => $ensure, } } diff --git a/manifests/plugin/statistics.pp b/manifests/plugin/statistics.pp index d3831037..87edb075 100644 --- a/manifests/plugin/statistics.pp +++ b/manifests/plugin/statistics.pp @@ -2,7 +2,15 @@ # # This class installs trends and statistics plugin # -class foreman::plugin::statistics { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::statistics ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'statistics': + version => $ensure, } } diff --git a/manifests/plugin/supervisory_authority.pp b/manifests/plugin/supervisory_authority.pp index 562e56a5..9ee5b1b8 100644 --- a/manifests/plugin/supervisory_authority.pp +++ b/manifests/plugin/supervisory_authority.pp @@ -28,6 +28,8 @@ # # $metrics_interval:: Specify the interval for reporting metrics to APM Server. # +# $ensure:: Specify the package state, or absent/purged to remove it +# class foreman::plugin::supervisory_authority ( Stdlib::HTTPUrl $server_url, String $secret_token, @@ -40,6 +42,7 @@ Integer[0] $transaction_max_spans = 500, Boolean $http_compression = false, String $metrics_interval = '30s', + Optional[String[1]] $ensure = undef, ) { $config = { foreman_supervisory_authority => { @@ -58,6 +61,7 @@ } foreman::plugin { 'supervisory_authority': - config => foreman::to_symbolized_yaml($config), + version => $ensure, + config => foreman::to_symbolized_yaml($config), } } diff --git a/manifests/plugin/tasks.pp b/manifests/plugin/tasks.pp index 8a9e0633..7a306dd2 100644 --- a/manifests/plugin/tasks.pp +++ b/manifests/plugin/tasks.pp @@ -9,12 +9,17 @@ # @param backup # Enable creating a backup of cleaned up tasks in CSV format when automatic_cleanup is enabled # +# @param $ensure +# Specify the package state, or absent/purged to remove it +# class foreman::plugin::tasks ( + Optional[String[1]] $ensure = undef, Boolean $automatic_cleanup = false, String $cron_line = '45 19 * * *', Boolean $backup = false, ) { foreman::plugin { 'tasks': + version => $ensure, package => $foreman::params::plugin_prefix.regsubst(/foreman[_-]/, 'foreman-tasks'), } $cron_state = $automatic_cleanup ? { diff --git a/manifests/plugin/templates.pp b/manifests/plugin/templates.pp index 8c8f5433..3e89f049 100644 --- a/manifests/plugin/templates.pp +++ b/manifests/plugin/templates.pp @@ -1,5 +1,13 @@ # Installs foreman_templates plugin -class foreman::plugin::templates { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::templates ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'templates': + version => $ensure, } } diff --git a/manifests/plugin/vault.pp b/manifests/plugin/vault.pp index 956bebd6..31a4dc52 100644 --- a/manifests/plugin/vault.pp +++ b/manifests/plugin/vault.pp @@ -2,7 +2,15 @@ # # This class installs vault plugin # -class foreman::plugin::vault { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::vault ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'vault': + version => $ensure, } } diff --git a/manifests/plugin/virt_who_configure.pp b/manifests/plugin/virt_who_configure.pp index f7e0b564..bd29927c 100644 --- a/manifests/plugin/virt_who_configure.pp +++ b/manifests/plugin/virt_who_configure.pp @@ -1,5 +1,13 @@ # Installs foreman_virt_who_configure plugin -class foreman::plugin::virt_who_configure { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::virt_who_configure ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'virt_who_configure': + version => $ensure, } } diff --git a/manifests/plugin/webhooks.pp b/manifests/plugin/webhooks.pp index a3c1cd81..43dd7b67 100644 --- a/manifests/plugin/webhooks.pp +++ b/manifests/plugin/webhooks.pp @@ -2,7 +2,15 @@ # # This class installs webhooks plugin # -class foreman::plugin::webhooks { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::webhooks ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'webhooks': + version => $ensure, } } diff --git a/manifests/plugin/wreckingball.pp b/manifests/plugin/wreckingball.pp index 5e21b38c..83058d53 100644 --- a/manifests/plugin/wreckingball.pp +++ b/manifests/plugin/wreckingball.pp @@ -1,5 +1,13 @@ # Installs foreman_wreckingball plugin -class foreman::plugin::wreckingball { +# +# === Advanced parameters: +# +# $ensure:: Specify the package state, or absent/purged to remove it +# +class foreman::plugin::wreckingball ( + Optional[String[1]] $ensure = undef, +) { foreman::plugin { 'wreckingball': + version => $ensure, } } diff --git a/spec/classes/plugin/acd_spec.rb b/spec/classes/plugin/acd_spec.rb index 07351d2a..69d62ae0 100644 --- a/spec/classes/plugin/acd_spec.rb +++ b/spec/classes/plugin/acd_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'foreman::plugin::acd' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'acd' it { should contain_foreman__plugin('tasks') } it { should contain_foreman__plugin('remote_execution') } diff --git a/spec/classes/plugin/ansible_spec.rb b/spec/classes/plugin/ansible_spec.rb index ac18e221..d8a5006c 100644 --- a/spec/classes/plugin/ansible_spec.rb +++ b/spec/classes/plugin/ansible_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'foreman::plugin::ansible' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'ansible' it { should contain_foreman__plugin('tasks') } end diff --git a/spec/classes/plugin/azure_spec.rb b/spec/classes/plugin/azure_spec.rb index ee6050f8..235b81c2 100644 --- a/spec/classes/plugin/azure_spec.rb +++ b/spec/classes/plugin/azure_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::azure' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'azure_rm' end diff --git a/spec/classes/plugin/bootdisk_spec.rb b/spec/classes/plugin/bootdisk_spec.rb index 9492430f..9ea394f4 100644 --- a/spec/classes/plugin/bootdisk_spec.rb +++ b/spec/classes/plugin/bootdisk_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::bootdisk' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'bootdisk' end diff --git a/spec/classes/plugin/datacenter.rb b/spec/classes/plugin/datacenter.rb index f20acfb1..b939479c 100644 --- a/spec/classes/plugin/datacenter.rb +++ b/spec/classes/plugin/datacenter.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::datacenter' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'datacenter' end diff --git a/spec/classes/plugin/default_hostgroup_spec.rb b/spec/classes/plugin/default_hostgroup_spec.rb index f08d829f..332183cc 100644 --- a/spec/classes/plugin/default_hostgroup_spec.rb +++ b/spec/classes/plugin/default_hostgroup_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'foreman::plugin::default_hostgroup' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'default_hostgroup' context 'with user provided config hash' do diff --git a/spec/classes/plugin/dhcp_browser_spec.rb b/spec/classes/plugin/dhcp_browser_spec.rb index b7e5e011..e96b5a5e 100644 --- a/spec/classes/plugin/dhcp_browser_spec.rb +++ b/spec/classes/plugin/dhcp_browser_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::dhcp_browser' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'dhcp_browser' end diff --git a/spec/classes/plugin/discovery_spec.rb b/spec/classes/plugin/discovery_spec.rb index 1b8eeac3..6ebb539d 100644 --- a/spec/classes/plugin/discovery_spec.rb +++ b/spec/classes/plugin/discovery_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::discovery' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'discovery' end diff --git a/spec/classes/plugin/dlm_spec.rb b/spec/classes/plugin/dlm_spec.rb index d65deb6e..dcb917af 100644 --- a/spec/classes/plugin/dlm_spec.rb +++ b/spec/classes/plugin/dlm_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::dlm' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'dlm' end diff --git a/spec/classes/plugin/expire_hosts_spec.rb b/spec/classes/plugin/expire_hosts_spec.rb index 6e83ef40..72263a48 100644 --- a/spec/classes/plugin/expire_hosts_spec.rb +++ b/spec/classes/plugin/expire_hosts_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::expire_hosts' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'expire_hosts' end diff --git a/spec/classes/plugin/git_templates_spec.rb b/spec/classes/plugin/git_templates_spec.rb index b674ca22..b0383933 100644 --- a/spec/classes/plugin/git_templates_spec.rb +++ b/spec/classes/plugin/git_templates_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::git_templates' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'git_templates' end diff --git a/spec/classes/plugin/google_spec.rb b/spec/classes/plugin/google_spec.rb index df9ba9b5..a012c174 100644 --- a/spec/classes/plugin/google_spec.rb +++ b/spec/classes/plugin/google_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::google' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'google' end diff --git a/spec/classes/plugin/hdm_spec.rb b/spec/classes/plugin/hdm_spec.rb index c70ab348..1b9bcf6b 100644 --- a/spec/classes/plugin/hdm_spec.rb +++ b/spec/classes/plugin/hdm_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::hdm' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'hdm' end diff --git a/spec/classes/plugin/host_extra_validator_spec.rb b/spec/classes/plugin/host_extra_validator_spec.rb index 0a171b50..60e66c18 100644 --- a/spec/classes/plugin/host_extra_validator_spec.rb +++ b/spec/classes/plugin/host_extra_validator_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::host_extra_validator' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'host_extra_validator' end diff --git a/spec/classes/plugin/kernel_care_spec.rb b/spec/classes/plugin/kernel_care_spec.rb index d0426cbb..9fea9718 100644 --- a/spec/classes/plugin/kernel_care_spec.rb +++ b/spec/classes/plugin/kernel_care_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::kernel_care' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'kernel_care' end diff --git a/spec/classes/plugin/kubevirt_spec.rb b/spec/classes/plugin/kubevirt_spec.rb index 30685e2d..dedcb3eb 100644 --- a/spec/classes/plugin/kubevirt_spec.rb +++ b/spec/classes/plugin/kubevirt_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::kubevirt' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'kubevirt' end diff --git a/spec/classes/plugin/leapp_spec.rb b/spec/classes/plugin/leapp_spec.rb index 93c115a3..46554757 100644 --- a/spec/classes/plugin/leapp_spec.rb +++ b/spec/classes/plugin/leapp_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'foreman::plugin::leapp' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'leapp' it { should contain_foreman__plugin('remote_execution') } it { should contain_foreman__plugin('ansible') } diff --git a/spec/classes/plugin/monitoring_spec.rb b/spec/classes/plugin/monitoring_spec.rb index a7ca720f..3d8115e9 100644 --- a/spec/classes/plugin/monitoring_spec.rb +++ b/spec/classes/plugin/monitoring_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::monitoring' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'monitoring' end diff --git a/spec/classes/plugin/netbox_spec.rb b/spec/classes/plugin/netbox_spec.rb index 9f129302..423bf16a 100644 --- a/spec/classes/plugin/netbox_spec.rb +++ b/spec/classes/plugin/netbox_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::netbox' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'netbox' end diff --git a/spec/classes/plugin/omaha_spec.rb b/spec/classes/plugin/omaha_spec.rb index a18d63c8..c642b547 100644 --- a/spec/classes/plugin/omaha_spec.rb +++ b/spec/classes/plugin/omaha_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::omaha' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'omaha' end diff --git a/spec/classes/plugin/proxmox_spec.rb b/spec/classes/plugin/proxmox_spec.rb index 7a43616f..325ea215 100644 --- a/spec/classes/plugin/proxmox_spec.rb +++ b/spec/classes/plugin/proxmox_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::proxmox' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'fog_proxmox' end diff --git a/spec/classes/plugin/puppet_spec.rb b/spec/classes/plugin/puppet_spec.rb index c9f35e38..151adb0f 100644 --- a/spec/classes/plugin/puppet_spec.rb +++ b/spec/classes/plugin/puppet_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::puppet' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'puppet' end diff --git a/spec/classes/plugin/rescue_spec.rb b/spec/classes/plugin/rescue_spec.rb index 9d99852e..805635b2 100644 --- a/spec/classes/plugin/rescue_spec.rb +++ b/spec/classes/plugin/rescue_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::rescue' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'rescue' end diff --git a/spec/classes/plugin/rh_cloud_spec.rb b/spec/classes/plugin/rh_cloud_spec.rb index d843536b..cb5daf67 100644 --- a/spec/classes/plugin/rh_cloud_spec.rb +++ b/spec/classes/plugin/rh_cloud_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::rh_cloud' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'rh_cloud' end diff --git a/spec/classes/plugin/salt_spec.rb b/spec/classes/plugin/salt_spec.rb index ab5ca376..714e90fe 100644 --- a/spec/classes/plugin/salt_spec.rb +++ b/spec/classes/plugin/salt_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'foreman::plugin::salt' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'salt' it { should contain_foreman__plugin('tasks') } end diff --git a/spec/classes/plugin/scc_manager_spec.rb b/spec/classes/plugin/scc_manager_spec.rb index fba13dfd..9a255feb 100644 --- a/spec/classes/plugin/scc_manager_spec.rb +++ b/spec/classes/plugin/scc_manager_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::scc_manager' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'scc_manager' end diff --git a/spec/classes/plugin/snapshot_management_spec.rb b/spec/classes/plugin/snapshot_management_spec.rb index fc9cd3d9..0abc750d 100644 --- a/spec/classes/plugin/snapshot_management_spec.rb +++ b/spec/classes/plugin/snapshot_management_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::snapshot_management' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'snapshot_management' end diff --git a/spec/classes/plugin/statistics_spec.rb b/spec/classes/plugin/statistics_spec.rb index 9d66d5c3..e2e1abf9 100644 --- a/spec/classes/plugin/statistics_spec.rb +++ b/spec/classes/plugin/statistics_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::statistics' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'statistics' end diff --git a/spec/classes/plugin/templates_spec.rb b/spec/classes/plugin/templates_spec.rb index 6e08279f..ebeb5e60 100644 --- a/spec/classes/plugin/templates_spec.rb +++ b/spec/classes/plugin/templates_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::templates' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'templates' end diff --git a/spec/classes/plugin/vault_spec.rb b/spec/classes/plugin/vault_spec.rb index 0632fe4a..3701aa36 100644 --- a/spec/classes/plugin/vault_spec.rb +++ b/spec/classes/plugin/vault_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::vault' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'vault' end diff --git a/spec/classes/plugin/virt_who_configure_spec.rb b/spec/classes/plugin/virt_who_configure_spec.rb index a30fa03e..ca4c3d59 100644 --- a/spec/classes/plugin/virt_who_configure_spec.rb +++ b/spec/classes/plugin/virt_who_configure_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::virt_who_configure' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'virt_who_configure' end diff --git a/spec/classes/plugin/webhooks_spec.rb b/spec/classes/plugin/webhooks_spec.rb index 41780770..28b716ff 100644 --- a/spec/classes/plugin/webhooks_spec.rb +++ b/spec/classes/plugin/webhooks_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::webhooks' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'webhooks' end diff --git a/spec/classes/plugin/wreckingball_spec.rb b/spec/classes/plugin/wreckingball_spec.rb index 03d81765..4b137156 100644 --- a/spec/classes/plugin/wreckingball_spec.rb +++ b/spec/classes/plugin/wreckingball_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' describe 'foreman::plugin::wreckingball' do + let(:params) { {} } include_examples 'basic foreman plugin tests', 'wreckingball' end diff --git a/spec/support/plugin.rb b/spec/support/plugin.rb index f53144f3..f1fa974e 100644 --- a/spec/support/plugin.rb +++ b/spec/support/plugin.rb @@ -5,4 +5,15 @@ let(:pre_condition) { 'include foreman' } it { should compile.with_all_deps } it { should contain_foreman__plugin(name) } + + context 'with ensure = 1.2.3-4' do + let(:params) do + super().merge(ensure: '1.2.3-4') + end + + it do + should contain_foreman__plugin(name) + .with_version('1.2.3-4') + end + end end