diff --git a/manifests/plugin/puppetdb.pp b/manifests/plugin/puppetdb.pp index d33fc3b99..0eb8117d2 100644 --- a/manifests/plugin/puppetdb.pp +++ b/manifests/plugin/puppetdb.pp @@ -20,6 +20,9 @@ # # $ssl_private_key:: Private key file which will be used to connect to the PuppetDB API. # Defaults to client_ssl_key +# +# $api_version:: PuppetDB API version. +# Defaults to '4' class foreman::plugin::puppetdb ( String $package = $::foreman::plugin::puppetdb::params::package, Stdlib::HTTPUrl $address = $::foreman::plugin::puppetdb::params::address, @@ -27,6 +30,7 @@ String $ssl_ca_file = $::foreman::plugin::puppetdb::params::ssl_ca_file, String $ssl_certificate = $::foreman::plugin::puppetdb::params::ssl_certificate, String $ssl_private_key = $::foreman::plugin::puppetdb::params::ssl_private_key, + Enum['1', '3', '4'] $api_version = '4', ) inherits foreman::plugin::puppetdb::params { foreman::plugin { 'puppetdb': package => $package, @@ -49,4 +53,7 @@ -> foreman_config_entry { 'puppetdb_ssl_private_key': value => $ssl_private_key, } + -> foreman_config_entry { 'puppetdb_api_version': + value => $api_version, + } }