| A similar issue is that puppet config print doesn't handle `array` setting types correctly. It outputs:
$ bundle exec puppet config print supported_checksum_types |
bx puppet config print supported_checksum_types |
md5 |
sha256 |
sha384 |
sha512 |
sha224 |
$ bundle exec puppet config print --all | grep supported_checksum_types |
supported_checksum_types = ["md5", "sha256", "sha384", "sha512", "sha224"] |
But none of those can be entered verbatim in puppet.conf as doing so results in:
$ bundle exec puppet config print --all | grep supported_checksum_types >> ~/.puppetlabs/etc/puppet/puppet.conf |
$ cat ~/.puppetlabs/etc/puppet/puppet.conf |
supported_checksum_types = ["md5", "sha256", "sha384", "sha512", "sha224"] |
$ bundle exec puppet apply -e 'notify { $settings::supported_checksum_types: }' |
Error: Could not initialize global default settings: Invalid value '["md5"' for parameter supported_checksum_types. Allowed values are 'md5', 'md5lite', 'sha256', 'sha256lite', 'sha384', 'sha512', 'sha224', 'sha1', 'sha1lite', 'mtime', 'ctime' |
It seems like puppet config print should join array settings as a comma delimited list, without any quoting so that the following works.
$ cat ~/.puppetlabs/etc/puppet/puppet.conf |
supported_checksum_types = md5, sha256, sha384, sha512, sha224 |
$ bundle exec puppet apply -e 'notify { $settings::supported_checksum_types: }' |
Notice: Compiled catalog for XXX in environment production in 0.03 seconds |
Notice: md5 |
Notice: /Stage[main]/Main/Notify[md5]/message: defined 'message' as 'md5' |
Notice: sha256 |
Notice: /Stage[main]/Main/Notify[sha256]/message: defined 'message' as 'sha256' |
Notice: sha384 |
Notice: /Stage[main]/Main/Notify[sha384]/message: defined 'message' as 'sha384' |
Notice: sha512 |
Notice: /Stage[main]/Main/Notify[sha512]/message: defined 'message' as 'sha512' |
Notice: sha224 |
Notice: /Stage[main]/Main/Notify[sha224]/message: defined 'message' as 'sha224' |
Notice: Applied catalog in 0.02 seconds |
|