diff --git a/manifests/init.pp b/manifests/init.pp index cbfebb05..e8a62b69 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -87,6 +87,7 @@ class proxysql ( String $package_name = $::proxysql::params::package_name, String $package_ensure = $::proxysql::params::package_ensure, + Array[String] $package_install_options = $::proxysql::params::package_install_options, String $service_name = $::proxysql::params::service_name, String $service_ensure = $::proxysql::params::service_ensure, diff --git a/manifests/install.pp b/manifests/install.pp index 6c45bced..dd5263a9 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -5,7 +5,8 @@ class proxysql::install { package { $::proxysql::package_name: - ensure => $::proxysql::package_ensure, + ensure => $::proxysql::package_ensure, + install_options => $::proxysql::package_install_options, } file { 'proxysql-datadir': diff --git a/manifests/params.pp b/manifests/params.pp index 6ea5f4ac..fd4b4a75 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,6 +6,7 @@ class proxysql::params { $package_name = 'proxysql' $package_ensure = 'installed' + $package_install_options = [] $service_name = 'proxysql' $service_ensure = 'running' diff --git a/spec/classes/proxysql_spec.rb b/spec/classes/proxysql_spec.rb index 960eb29a..aa6b28db 100644 --- a/spec/classes/proxysql_spec.rb +++ b/spec/classes/proxysql_spec.rb @@ -26,7 +26,10 @@ it { is_expected.to contain_class('mysql::client').with(bindings_enable: false) } - it { is_expected.to contain_package('proxysql').with_ensure('installed') } + it do + is_expected.to contain_package('proxysql').with(ensure: 'installed', + install_options: []) + end it do is_expected.to contain_file('proxysql-config-file').with(ensure: 'file',