Add default variable assignment for optional Variables
This commit is contained in:
parent
66b8108d2b
commit
447b5e8c40
|
@ -81,15 +81,15 @@ class limesurvey (
|
|||
Boolean $manage_webserver,
|
||||
Boolean $manage_php,
|
||||
|
||||
Optional[String] $dbhost,
|
||||
Optional[String] $dbname,
|
||||
Optional[String] $dbpassword,
|
||||
Optional[String] $dbuser,
|
||||
Optional[String] $sql_root_password,
|
||||
Optional[String] $vhost_name,
|
||||
Optional[String] $vhost_port,
|
||||
Optional[String] $mpm_module,
|
||||
Optional[Hash] $php_packages,
|
||||
Optional[String] $dbuser = undef,
|
||||
Optional[String] $sql_root_password = undef,
|
||||
Optional[String] $vhost_name = undef,
|
||||
Optional[String] $vhost_port = undef,
|
||||
Optional[String] $mpm_module = undef,
|
||||
Optional[Hash] $php_packages = undef,
|
||||
Optional[String] $dbhost = undef,
|
||||
Optional[String] $dbname = undef,
|
||||
Optional[String] $dbpassword = undef,
|
||||
|
||||
String $database_class = 'limesurvey::database',
|
||||
String $webserver_class = 'limesurvey::webserver',
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'limesurvey' do
|
||||
|
||||
context 'apply without manage_' do
|
||||
it 'should idempotently run' do
|
||||
pp = <<-EOS
|
||||
class { 'limesurvey':
|
||||
www_user => 'www-data',
|
||||
www_group => 'www-data',
|
||||
manage_webserver => false,
|
||||
manage_database => false,
|
||||
manage_php => false,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue