Update rabbitmq module
[mirror/dsa-puppet.git] / 3rdparty / modules / rabbitmq / lib / puppet / type / rabbitmq_erlang_cookie.rb
index c2e5898..0673caf 100644 (file)
@@ -1,13 +1,23 @@
 Puppet::Type.newtype(:rabbitmq_erlang_cookie) do
-  desc 'Type to manage the rabbitmq erlang cookie securely'
+  desc <<-DESC
+Type to manage the rabbitmq erlang cookie securely
 
-  newparam(:path, :namevar => true)
+This is essentially a private type used by the rabbitmq::config class
+to manage the erlang cookie. It replaces the rabbitmq_erlang_cookie fact
+from earlier versions of this module. It manages the content of the cookie
+usually located at "${rabbitmq_home}/.erlang.cookie", which includes
+stopping the rabbitmq service and wiping out the database at
+"${rabbitmq_home}/mnesia" if the user agrees to it. We don't recommend using
+this type directly.
+DESC
+
+  newparam(:path, namevar: true)
 
   newproperty(:content) do
     desc 'Content of cookie'
-    newvalues(/^\S+$/)
-    def change_to_s(current, desired)
-      "The rabbitmq erlang cookie was changed"
+    newvalues(%r{^\S+$})
+    def change_to_s(_current, _desired)
+      'The rabbitmq erlang cookie was changed'
     end
   end
 
@@ -29,6 +39,6 @@ Puppet::Type.newtype(:rabbitmq_erlang_cookie) do
   end
 
   newparam(:service_name) do
-    newvalues(/^\S+$/)
+    newvalues(%r{^\S+$})
   end
 end