Support single options that legally include a comma like "from=host1,host2". We now basically allow either "word" or "key=value" as options. That's also what the parsedfile provider currently supports when parsing options.
Signed-off-by: Stefan Schulte <[email protected]> --- Local-branch: ticket/2.7.x/7114fixup lib/puppet/type/ssh_authorized_key.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/puppet/type/ssh_authorized_key.rb b/lib/puppet/type/ssh_authorized_key.rb index 170dc83..974d9c8 100644 --- a/lib/puppet/type/ssh_authorized_key.rb +++ b/lib/puppet/type/ssh_authorized_key.rb @@ -92,7 +92,9 @@ module Puppet end validate do |value| - raise Puppet::Error, "Options must be provided as an array, not a comma separated list" if value != :absent and value.include?(',') + unless value == :absent or value =~ /^[-a-z0-9A-Z_]+(?:=\".*?\")?$/ + raise Puppet::Error, "Option #{value} is not valid. A single option must either be of the form 'option' or 'option=\"value\". Multiple options must be provided as an array" + end end end -- 1.7.5.3 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
