summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/host.rb15
-rwxr-xr-xlib/puppet/type/port.rb11
-rwxr-xr-xlib/puppet/type/sshkey.rb10
3 files changed, 17 insertions, 19 deletions
diff --git a/lib/puppet/type/host.rb b/lib/puppet/type/host.rb
index c8b5934fa..6c4e07b45 100755
--- a/lib/puppet/type/host.rb
+++ b/lib/puppet/type/host.rb
@@ -13,12 +13,11 @@ module Puppet
end
- newproperty(:alias) do
- desc "Any alias the host might have. Multiple values must be
- specified as an array. Note that this state has the same name
- as one of the metaparams; using this state to set aliases will
- make those aliases available in your Puppet scripts and also on
- disk."
+ newproperty(:host_aliases) do
+ desc 'Any aliases the host might have. Multiple values must be
+ specified as an array. Note that this property is not the same as
+ the "alias" metaparam; use this property to add aliases to a host
+ on disk, and "alias" to aliases for use in your Puppet scripts.'
def insync?(is)
is == @should
@@ -63,9 +62,7 @@ module Puppet
end
validate do |value|
- if value =~ /\s/
- raise Puppet::Error, "Aliases cannot include whitespace"
- end
+ raise Puppet::Error, "Host aliases cannot include whitespace" if value =~ /\s/
end
end
diff --git a/lib/puppet/type/port.rb b/lib/puppet/type/port.rb
index fbb24425d..f186023be 100755
--- a/lib/puppet/type/port.rb
+++ b/lib/puppet/type/port.rb
@@ -57,11 +57,12 @@
# desc "The port description."
# end
#
-# newproperty(:alias) do
-# desc "Any aliases the port might have. Multiple values must be
-# specified as an array. Note that this property has the same name as
-# one of the metaparams; using this property to set aliases will make
-# those aliases available in your Puppet scripts and also on disk."
+# newproperty(:port_aliases) do
+# desc 'Any aliases the port might have. Multiple values must be
+# specified as an array. Note that this property is not the same as
+# the "alias" metaparam; use this property to add aliases to a port
+# in the services file, and "alias" to aliases for use in your Puppet
+# scripts.'
#
# # We actually want to return the whole array here, not just the first
# # value.
diff --git a/lib/puppet/type/sshkey.rb b/lib/puppet/type/sshkey.rb
index c9e8f3d8b..c1407a6ee 100755
--- a/lib/puppet/type/sshkey.rb
+++ b/lib/puppet/type/sshkey.rb
@@ -21,11 +21,11 @@ module Puppet
# FIXME This should automagically check for aliases to the hosts, just
# to see if we can automatically glean any aliases.
- newproperty(:alias) do
- desc "Any alias the host might have. Multiple values must be
- specified as an array. Note that this parameter has the same name
- as one of the metaparams; using this parameter to set aliases will
- make those aliases available in your Puppet scripts."
+ newproperty(:host_aliases) do
+ desc 'Any aliases the host might have. Multiple values must be
+ specified as an array. Note that this property is not the same as
+ the "alias" metaparam; use this property to add aliases to a host
+ on disk, and "alias" to aliases for use in your Puppet scripts.'
attr_accessor :meta