|
This commit adds a new package options parameter type that accepts an
array of strings or hashes. For example,
[ 'arg1', { 'key2' => 'val2', 'key2' => 'val3' }, 'arg4' ]
The parameter preserves the order of array elements, as it may be
significant for a provider, e.g. '--source', 'URL'. Order of hash
key-value pairs is based on the natural sort order of the keys. Any
argument containing spaces will automatically be quoted, so that you don't
have to check that in each manifest.
The package options parameter is not currently used, but will be in a
future commit to enable install and uninstall options to be passed to the
package provider.
Oddly, if any puppet parameter is specifed as an array with one element,
puppet's parser-based resource will automatically de-arrify it (see commit
46252b5b). As a result, if an array is a valid value, then the validate &
munge methods cannot reject an element that isn't an array.
Therefore, the package options munge method arrayifies values, which has
the side-efect that it will accept the 2.7.x style way of declaring
install_options for MSI packages. Moreso, it means that the old way cannot
be deprecated without changing core puppet behavior.
|