New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash, Array entries in config to python plugin ? #819
Labels
enhancement
New feature or request
Comments
Proceed with the proposal to render |
traylenator
added a commit
to traylenator/puppet-collectd
that referenced
this issue
Jun 20, 2018
Covert templates for `collectd::module::python` to `epp` Example ```puppet collectd::plugin::python::module{'example': config => [{'Verbose' => true, 'Values' => ['abc',def'], 'Name => 'My Name', 'Limit => 3.4 }, ], } } ``` This will now render as ```apache Import "example" <Module "example"> Verbose true Values "abc" "def" Name "My Name" Limit 3.4 </Module> ``` Specifying a hash in the configuration will now result in a type failure. Previously it would add nonsense to the configuration file. e.g ```puppet collectd::plugin::python::module{'example': config => [{'Values' => {'abc' => 'def'}}], } ``` will now give a type error. To specify a list of quoted strings use an array. Previously the following could be used. ```puppet collectd::plugin::python::module{'example': config => [{'Values' => '"abc" "def"', 'Name' => '"My Name"', }], } ``` to acheive the same result use ```puppet collectd::plugin::python::module{'example': config => [{'Values' => ['abc','def'], 'Name' => 'My Name', }], } ``` to render ```apacheconf Import "example" <Module "example"> Values "abc" "def" Name "My Name" </Module> Fixes voxpupuli#819
traylenator
added a commit
to traylenator/puppet-collectd
that referenced
this issue
Jun 20, 2018
Convert templates for `collectd::module::python` to `epp` Example ```puppet collectd::plugin::python::module{'example': config => [{'Verbose' => true, 'Values' => ['abc',def'], 'Name => 'My Name', 'Limit => 3.4 }, ], } } ``` This will now render as ```apache Import "example" <Module "example"> Verbose true Values "abc" "def" Name "My Name" Limit 3.4 </Module> ``` Specifying a hash value in the `config` paramater will now result in a type failure. Previously it would add nonsense to the configuration file. e.g ```puppet collectd::plugin::python::module{'example': config => [{'Values' => {'abc' => 'def'}}], } ``` will now give a type error. To specify a list of quoted strings use an array. Previously the following could be used. ```puppet collectd::plugin::python::module{'example': config => [{'Values' => '"abc" "def"', 'Name' => '"My Name"', }], } ``` to acheive the same result use ```puppet collectd::plugin::python::module{'example': config => [{'Values' => ['abc','def'], 'Name' => 'My Name', }], } ``` to render ```apacheconf Import "example" <Module "example"> Values "abc" "def" Name "My Name" </Module> It is now possible to specify multiple instances of single python module by using `collectd::plugin::python::module` twice. e.g. ```puppet collectd::plugin::python::module{'exampleA': module => 'example, config => [{'Values' => 'abc'],} } collectd::plugin::python::module{'exampleB': module => 'example, config => [{'Values' => 'def'],} } ``` Fixes voxpupuli#819
traylenator
added a commit
to traylenator/puppet-collectd
that referenced
this issue
Jun 20, 2018
Convert templates for `collectd::module::python` to `epp` Example ```puppet collectd::plugin::python::module{'example': config => [{'Verbose' => true, 'Values' => ['abc',def'], 'Name => 'My Name', 'Limit => 3.4 }, ], } } ``` This will now render as ```apache Import "example" <Module "example"> Verbose true Values "abc" "def" Name "My Name" Limit 3.4 </Module> ``` Specifying a hash value in the `config` paramater will now result in a type failure. Previously it would add nonsense to the configuration file. e.g ```puppet collectd::plugin::python::module{'example': config => [{'Values' => {'abc' => 'def'}}], } ``` will now give a type error. To specify a list of quoted strings use an array. Previously the following could be used. ```puppet collectd::plugin::python::module{'example': config => [{'Values' => '"abc" "def"', 'Name' => '"My Name"', }], } ``` to acheive the same result use ```puppet collectd::plugin::python::module{'example': config => [{'Values' => ['abc','def'], 'Name' => 'My Name', }], } ``` to render ```apacheconf Import "example" <Module "example"> Values "abc" "def" Name "My Name" </Module> It is now possible to specify multiple instances of single python module by using `collectd::plugin::python::module` twice. e.g. ```puppet collectd::plugin::python::module{'exampleA': module => 'example, config => [{'Values' => 'abc'],} } collectd::plugin::python::module{'exampleB': module => 'example, config => [{'Values' => 'def'],} } ``` Fixes voxpupuli#819
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
python-config.conf
containsWhat behaviour did you expect instead
The action is not documented so it is not obvious especially what the
Hash
should do.If I had to guess.
Any additional information you'd like to impart
Certainly the
hash
value I don't understand, I guess no one uses it or I am missingthe use case.
For the
array
value collectd modules are normally happy with either option but I wouldsuggest the 2nd is more natural.
Checking before contemplating
.epp
.The text was updated successfully, but these errors were encountered: