Version information
released Mar 21st 2016
This version is compatible with:
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'pcfens-command_args', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
pcfens/command_args — version 0.2.0 Mar 21st 2016
puppet-command_args
Convert a hash into command line arguments. The first argument is a hash of arguments that should be passed, along with corresponding value.
Optional (positional) arguments:
- The flag prefix to use (defaults to '--')
- The separator to use (defaults to '=')
Example:
$arguments = {
'aString' => 'words',
'secure' => true,
'insecure' => false,
'array' => ['item1', 'item2'],
}
command_args($arguments)
# => --aString=words --secure --array=item1 --array=item2
command_args($arguments, '-')
# => -aString=words -secure -array=item1 -array=item2
command_args($arguments, '--', ' ')
# => --aString words --secure --array item1 --array item2