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_webserver,
|
||||||
Boolean $manage_php,
|
Boolean $manage_php,
|
||||||
|
|
||||||
Optional[String] $dbhost,
|
Optional[String] $dbuser = undef,
|
||||||
Optional[String] $dbname,
|
Optional[String] $sql_root_password = undef,
|
||||||
Optional[String] $dbpassword,
|
Optional[String] $vhost_name = undef,
|
||||||
Optional[String] $dbuser,
|
Optional[String] $vhost_port = undef,
|
||||||
Optional[String] $sql_root_password,
|
Optional[String] $mpm_module = undef,
|
||||||
Optional[String] $vhost_name,
|
Optional[Hash] $php_packages = undef,
|
||||||
Optional[String] $vhost_port,
|
Optional[String] $dbhost = undef,
|
||||||
Optional[String] $mpm_module,
|
Optional[String] $dbname = undef,
|
||||||
Optional[Hash] $php_packages,
|
Optional[String] $dbpassword = undef,
|
||||||
|
|
||||||
String $database_class = 'limesurvey::database',
|
String $database_class = 'limesurvey::database',
|
||||||
String $webserver_class = 'limesurvey::webserver',
|
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