diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2010-11-30 16:17:28 -0800 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2010-11-30 16:17:28 -0800 |
| commit | ddeba8bc48f34571328e714a46f4a6c08a79db58 (patch) | |
| tree | ea38e57b7665a65854e555f4d3367eeebf653bb0 /lib | |
| parent | 701021f97870b4b0be07440b30a5c53faaf39933 (diff) | |
| parent | 0ab5e0f779d7261c4a9faf890cef8df52726a82a (diff) | |
Merge branch 'ticket/next/2495' into next
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/type/sshkey.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/type/sshkey.rb b/lib/puppet/type/sshkey.rb index b7a1b8a8d..59a1a12f8 100755 --- a/lib/puppet/type/sshkey.rb +++ b/lib/puppet/type/sshkey.rb @@ -41,7 +41,7 @@ module Puppet raise Puppet::Error, "Aliases cannot include whitespace" end if value =~ /,/ - raise Puppet::Error, "Aliases cannot include whitespace" + raise Puppet::Error, "Aliases must be provided as an array, not a comma-separated list" end end end @@ -50,6 +50,11 @@ module Puppet desc "The host name that the key is associated with." isnamevar + + validate do |value| + raise Puppet::Error, "Resourcename cannot include whitespaces" if value =~ /\s/ + raise Puppet::Error, "No comma in resourcename allowed. If you want to specify aliases use the host_aliases property" if value.include?(',') + end end newproperty(:target) do |
