search for: defaultto

Displaying 11 results from an estimated 11 matches for "defaultto".

2013 Feb 25
2
defaultto in hash property not obeyed
Hi. I seem to have the following problem. This is a code from my custom type: newproperty(:kernel_options) do desc "Kernel options for installation boot." defaultto {} def insync?(is) # @should is an Array. see lib/puppet/type.rb insync? should = @should.first # if members of hashes are not the same, something # was added or removed from manifest, so return false return false unless is.class == Hash and should.class ==...
2011 Jan 21
6
help writing types/provider
I''ve almost finished a pretty simple type/provider to manage RabbitMQ users and virtual hosts. I''m using the ''ensurable'' keyword in my type to save a bit of boilerplate. Type is below (the provider is just a wrapper around the ''rabbitmqctl'' command. Have a feeling there''s a developer guide somewhere I haven''t found (been
2007 Sep 24
3
Custom type
Hi. I have a small problem with the custom type I am working on. I define method ''evaluate'' which is called after all data is been collected. Here it is: module Puppet newtype(:test) do newparam(:name) do end newparam(:listen) do defaultto "silent" end def evaluate puts "evaluating..." return super.evaluate end end end The problem is that when running puppet I get: err: //default/testz/Test[1]: Failed to retrieve current state of resource: undefined method `evaluate'' for []:Ar...
2009 Sep 10
1
trouble with custom type on 0.24.8
...desc "The name of the repository" isnamevar end newparam(:enabled) do desc "Enabled status of the repository" newvalues(:yes, :no) defaultto "yes" end newparam(:refresh) do desc "Refresh status of the repository" newvalues(:yes, :no) defaultto "yes" end newparam(:type) do...
2013 Jul 13
10
username/password combo for custom provider (couchbase)
Hi, I''m trying to program custom type for managing Couchbase buckets. Problem is that every RW operation to Couchbase cluster (creating, deleting, resizing bucket) requires admin privileges (username/password). Do you have any suggestion how should I pass the username/password to provider? If I make it a param, then every resource of type ''couchbucket'' will need to
2012 Nov 07
2
Custom Type & Invalid Parameter...
...gt; Type: > Puppet::Type.newtype(:netapp_volume) do > @doc = "Manage Netapp Volume creation, modification and deletion." > > apply_to_device > > ensurable do > desc "Netapp Volume resource state. Valid values are: present, absent." > > defaultto(:present) > > newvalue(:present) do > provider.create > end > > newvalue(:absent) do > provider.destroy > end > end > > newparam(:name) do > desc "The volume name." > isnamevar > end > > newparam(:...
2010 Jun 30
1
Problem using the logadm pattern
...m_Patterns. I dropped it in .../lib/puppet/type/logadm.rb However, I am getting an error message: err: Could not run Puppet configuration client: Munging failed for value "puppet" in class backup: Global resource access is deprecated And I have traced it back to line 186 where it set: defaultto "puppet" > But that is where my ruby ability stops. I am comparing against .../lib/puppet/type/file.rb, and that seems to get away with doing this 1) Any ideas on what I need to do to fix the global access? 2) Do I log a ticket to get this type put into the base? 3) Who do I thank...
2010 Jun 23
0
Custom Type & Provider - param not working
I have created a custom type and provider. I wanted to go back and add in a little more functionality so I wanted to give it a new parameter. So where I declare the type I added newparam(:recurse) do newvalues(:true, :false) defaultto :false end No matter what I set the param to in my pp file accessing this param using @resource[:recurse] it is always nil. I have tried not doing any value validation and it is still nil. I have tried not putting a default value and it is still nil. Is there anything fundamentally wrong with w...
2006 Aug 05
2
PATCH: provide replace parameter for sourced files
...the node. RTS --- pfile.rb~ Wed Aug 2 04:47:05 2006 +++ pfile.rb Sat Aug 5 04:59:11 2006 @@ -113,6 +113,12 @@ end end + newparam(:replace) do + desc "Whether or not to replace a file that is + sourced but exists" + defaultto true + end + newparam(:ignore) do desc "A parameter which omits action on files matching specified patterns during recursion. Uses Ruby''s builtin globbing --- pfile/source.rb~ Sat Aug 5 06:58:53 2006 +++ pfile/source.rb Sat Au...
2007 Mar 01
8
upgrading puppet?
How are people upgrading puppet itself on their hosts that run puppetd? Can puppet be used to upgrade to a new puppet package via gem, rpm or some other package provider? How do you handle restarting? Just hoping theres a better way than "ssh and a for loop" or having to have another configuration management system installed.
2007 Jun 04
16
Puppet installation and observations
Greeting Puppeteers, ( I sent this from the wrong address so it may be a duplicate post after moderation ) I recently discovered puppet from the debian administration site and thought I might install it after BASHING my head against cfengine the last 3 times I tried to install it. I installed puppetmaster on my primary server and dropped puppet on a couple of xen virtuals. It worked