search for: newproperty

Displaying 9 results from an estimated 9 matches for "newproperty".

Did you mean: getproperty
2010 Aug 23
4
Trouble making a pure ruby puppet type
I''m making a cups manager type and I''m having trouble figuring out where I should parameters and where I should use properties. The file is at http://github.com/kc7zzv/puppet-cups_printer/blob/master/lib/puppet/type/cups_printer.rb . I was accidentally using "newproperty" and "newparameter" interchangeably, and I''d really like to know which I should be using. Second, the documentation says to define "ensure" as a parameter, but the example I saw seems to do what I''m doing in that file. Which is right? -- You received...
2009 Sep 10
1
trouble with custom type on 0.24.8
...aram(:type) do desc "Type of repository" newvalues(:yum, :yast, :plaindir) end newparam(:uri) do desc "URI that points to the repository" end newproperty(:ensure) do desc "Whether the repository is present or not." newvalue :outofsync newvalue :insync end newproperty(:ensure) do desc "Whether the repositor...
2011 Nov 15
10
Adding a parameter to a custom Puppet type/provider
Hi All, I''ve downloaded a Puppet module and I''m trying to add a parameter to it by editing lib/puppet/type/<resource>.rb. I simply added: newproperty(:pcfree) do desc "My description here" end In the corresponding file in lib/puppet/provider, I do something with :pcfree. Whenever I call the resource from Puppet with my new parameter, it keeps saying "Invalid parameter pcfree". Do I have to define the new parame...
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...
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
2009 Dec 04
3
yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
I''m using puppet-0.24.8-4.el5 on CentOS 5.4. My problem is yumrepo isn''t writing the "name=" field to the repository files which causes yum to complain with the error: Repository ''local-CentOS-5.4-x86_64'' is missing name in configuration, using id I get this behavior on all of my yumrepo definitions. One of them looks like this: yumrepo {
2010 May 17
3
Writing a properly-formed custom type (configxml)
Please hold my hand. After studying the wiki, several unofficial pages, various mailing list entries, and the operation of the "iptables" type as found on the net, I have created a custom type, lovingly named ``configxml''''. It updates attributes on the first element matching a supplied XPath in a given XML file. The first use case is configuring Atlassian JIRA to use
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 Aug 23
24
Type development for the rest of us
Since I had my type development epiphany a couple of days ago, I''ve decided to write down my understanding of developing simple types, at http://reductivelabs.com/trac/puppet/wiki/PracticalTypes. I''d appreciate comments from people who already know how to develop types as to correctness, and also comments from people who are new to type development about whether it''s a