| Puppet Version: Tested with 5.5.19 Puppet Server Version: Without server, puppet apply OS Name/Version: Ubuntu 1804 I am working on this custom provider : https://gitlab.adullact.net/adullact/puppet-nextcloud/-/blob/36-add-nextcloud_config-type-provider/lib/puppet/provider/nextcloud_config/php.rb When the Puppet manifest have an Array as with setting trusted_domains, the setter receive the first element of the Array as a String and not an Array. To reproduce you can run acceptance tests like here : https://gitlab.adullact.net/adullact/puppet-nextcloud/-/blob/36-add-nextcloud_config-type-provider/spec/acceptance/nextcloud_spec.rb Nextcloud is a PHP app. It requires a webserver and a database server before, like with spec helper acceptance : https://gitlab.adullact.net/adullact/puppet-nextcloud/-/blob/36-add-nextcloud_config-type-provider/spec/spec_helper_acceptance.rb The module take care of PHP. Desired Behavior: Puppet take care of Array with following output :
Notice: /Stage[main]/Nextcloud::Config/Nextcloud_config[trusted_domains]/value: value changed ['localhost'] to 'localhost','[cloud.example.com
{{}} Actual Behavior: The Nextcloud's configuration is done in a config.php file like this one (have a look to setting trusted_domains that is array :
<?php $CONFIG = array ( 'passwordsalt' => 'XqxWppqWQ0/zMN/ur4wHn6SFTHhYLb', 'secret' => '+XEHiU8/1tfVkFL43QRepi5ev6i+vzU5jD3ZZjDd5MKuGEB8', 'trusted_domains' => array( 0 => 'localhost', ), 'datadirectory' => '/var/nextcloud-data', 'dbtype' => 'mysql', 'version' => '18.0.3.0', 'overwrite.cli.url' => 'http://localhost', 'dbname' => 'nextcloud_example', 'dbhost' => '127.0.0.1', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'user_example', 'dbpassword' => 'secret', 'installed' => true, 'instanceid' => 'ocrdo3b60mb3', 'memcache.local' => '\\OC\\Memcache Redis', 'memcache.distributed' => '\\OC\\Memcache Redis', 'memcache.locking' => '\\OC\\Memcache Redis', 'filelocking.enabled' => 'true', 'redis' => array ( 'host' => '127.0.0.1', 'port' => '6379', 'timeout' => '1.5', ), 'mail_smtpmode' => 'smtp', 'mail_smtphost' => 'smtp.example.com', 'mail_smtpport' => '425', 'mail_smtpsecure' => 'tls', 'mail_smtpauth' => 'true', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpname' => 'username', 'mail_smtppassword' => 'password', );
The manifests is class { 'nextcloud' : database_name => 'nextcloud_example', database_user => 'user_example', database_password => 'secret', system_user => 'www-data', config => { 'trusted_domains' => [ 'localhost', '[cloud.example.com|http://cloud.example.com/] ', ], } } The output when applyed is :
Notice: /Stage[main]/Nextcloud::Config/Nextcloud_config[trusted_domains]/value: value changed ['localhost'] to 'localhost'
The expected output is :
Notice: /Stage[main]/Nextcloud::Config/Nextcloud_config[trusted_domains]/value: value changed ['localhost'] to 'localhost','[cloud.example.com {{}}
|