Re: [Puppet Users] Trouble making a pure ruby puppet type
On Aug 22, 2010, at 9:33 PM, Dan Bode wrote: > > > On Sun, Aug 22, 2010 at 9:30 PM, Patrick wrote: > > On Aug 22, 2010, at 9:26 PM, Dan Bode wrote: > >> Hi Patrick, >> >> Which is right? >> >> if you just need absent/present ensure states, then use the ensurable method >> (expects create/exists?/destroy on the provider). otherwise it should be >> created as a property. > > So for example, if you were creating a file resource, you would make > > > path > > would be a parameter. > > , and mode parameters? > > > mode would be a property. > >> -Dan >> > I see now. Thanks for the help. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Trouble making a pure ruby puppet type
On Sun, Aug 22, 2010 at 9:30 PM, Patrick wrote: > > On Aug 22, 2010, at 9:26 PM, Dan Bode wrote: > > Hi Patrick, > > On Sun, Aug 22, 2010 at 9:01 PM, Patrick wrote: > >> 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" >> > > properties are attributes that can be queried/synchronized. This expects > getter/setters to be created. > > Think about Mode or Owner for the file resource. If a file exists, we can > query the current state of these attributes, and possibly sync it. > > >> and "newparameter" >> > > newparam - this is just data that can be used by the provider. > > Like recurse or force for the file resource (these are not things that are > synced) > > Which is right? >> > > if you just need absent/present ensure states, then use the ensurable > method (expects create/exists?/destroy on the provider). otherwise it should > be created as a property. > > > So for example, if you were creating a file resource, you would make > > path > would be a parameter. > , and mode parameters? > > mode would be a property. > -Dan > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Trouble making a pure ruby puppet type
On Aug 22, 2010, at 9:26 PM, Dan Bode wrote: > Hi Patrick, > > On Sun, Aug 22, 2010 at 9:01 PM, Patrick wrote: > 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" > > properties are attributes that can be queried/synchronized. This expects > getter/setters to be created. > > Think about Mode or Owner for the file resource. If a file exists, we can > query the current state of these attributes, and possibly sync it. > > and "newparameter" > > newparam - this is just data that can be used by the provider. > > Like recurse or force for the file resource (these are not things that are > synced) > > Which is right? > > if you just need absent/present ensure states, then use the ensurable method > (expects create/exists?/destroy on the provider). otherwise it should be > created as a property. So for example, if you were creating a file resource, you would make path, and mode parameters? > -Dan > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Trouble making a pure ruby puppet type
Hi Patrick, On Sun, Aug 22, 2010 at 9:01 PM, Patrick wrote: > 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" > properties are attributes that can be queried/synchronized. This expects getter/setters to be created. Think about Mode or Owner for the file resource. If a file exists, we can query the current state of these attributes, and possibly sync it. > and "newparameter" > newparam - this is just data that can be used by the provider. Like recurse or force for the file resource (these are not things that are synced) 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. > not sure what you mean here. > Which is right? > if you just need absent/present ensure states, then use the ensurable method (expects create/exists?/destroy on the provider). otherwise it should be created as a property. -Dan > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] 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 this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: How to change the node's class or groups
Hi all: Who can help me to resolve this problem. ### Best regards Timo Seven blog: http://zauc.wordpress.com twitter: http://twitter.com/zauc Linux System Admin & MySQL DBA 在 2010年8月19日 下午1:47,Timo Seven 写道: > follow is the log > > > Processing NodesController#update (for 10.1.41.81 at 2010-08-19 13:45:53) > [PUT] > Parameters: {"node"=>{"name"=>"puppet.timo.com", > "node_group_names"=>[" "], "parameter_attributes"=>[{"value"=>"", > "key"=>""}], "node_class_names"=>[" "], "description"=>""}, > "action"=>"update", "_method"=>"put", > "authenticity_token"=>"sV1FfxR5EAatq+BW/ApH7/JPEK9LLwmKCtBEDIvYmQI=", > "id"=>"puppet.timo.com", "controller"=>"nodes"} > Redirected to http://10.10.83.193:3000/nodes/puppet.timo.com > Completed in 40ms (DB: 0) | 302 Found > [http://10.10.83.193/nodes/puppet.timo.com] > > > > ### > > Best regards > Timo Seven > blog: http://zauc.wordpress.com > twitter: http://twitter.com/zauc > Linux System Admin & MySQL DBA > > > > > 在 2010年8月19日 上午11:50,Timo Seven 写道: >> Hi all: >> >> I install puppet version 2.6 and puppet dashboard 1.0.3. >> >> When I change one node's class or groups, it is invalid。 I also can >> add new class and groups. But no nodes can be in these class or >> groups. >> >> So I insert a node in a class under mysql like "insert into >> node_class_memberships values (1,1,1,'2010-08-17','2010-08-17');", >> Then I can see the first node has been in the first class. >> >> >> >> >> ### >> >> Best regards >> Timo Seven >> blog: http://zauc.wordpress.com >> twitter: http://twitter.com/zauc >> Linux System Admin & MySQL DBA >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Parsing yaml report locallly
Great idea Sent from my iPhone On Aug 22, 2010, at 9:58 AM, "R.I.Pienaar" wrote: > hello, > > - "Chris" wrote: > >> Hi >> >> Is there a way to parse the yaml reports on locally on the puppet >> clients. What I'd like to offer our sysadmins is a command that will >> give them some info when the last puppetrun was and whether anything >> has changed. This could be included in .profile/.bashrc. We have an >> environment where admins look after a their "own" machines. And it is >> new that something like puppet ist allowed to interfer with "their" >> systems so we are slowly getting used to the new situation. I do hope >> that we will eventually move to a centralized reporting UI. We're >> just >> not that far yet. > > I made a feature request so the report gets saved locally > http://projects.reductivelabs.com/issues/4339 not sure how you'd get this > information today > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Parsing yaml report locallly
Puppet logs to syslog so why not setup an alias that just runs "grep puppet /var/log/messages". The log file may differ between distributions (daemon.log for Debian), but this generally suffices for me. On 23 August 2010 00:20, Carl.caum wrote: > You could always have a script that queries the puppetmaster or whatever your > report server is. I'd just use https. Have some cgi script that grabs the > latest yaml file for the requesting host and then returns it. The requesting > script on the client can then parse it and do whatever with it. You could get > crazy and cache the report locally but you'd need some way of dirtying it > after each puppet run. > I don't think there's any security implications in that. You shouldn't have > any sensitive data in your reports unless you log the output of Execs that > contain passwords. > > On Aug 22, 2010, at 8:52 AM, Chris wrote: > >> Hi >> >> Is there a way to parse the yaml reports on locally on the puppet >> clients. What I'd like to offer our sysadmins is a command that will >> give them some info when the last puppetrun was and whether anything >> has changed. This could be included in .profile/.bashrc. We have an >> environment where admins look after a their "own" machines. And it is >> new that something like puppet ist allowed to interfer with "their" >> systems so we are slowly getting used to the new situation. I do hope >> that we will eventually move to a centralized reporting UI. We're just >> not that far yet. >> >> >> Thanks for any help >> >> >> Chris >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Parsing yaml report locallly
You could always have a script that queries the puppetmaster or whatever your report server is. I'd just use https. Have some cgi script that grabs the latest yaml file for the requesting host and then returns it. The requesting script on the client can then parse it and do whatever with it. You could get crazy and cache the report locally but you'd need some way of dirtying it after each puppet run. I don't think there's any security implications in that. You shouldn't have any sensitive data in your reports unless you log the output of Execs that contain passwords. On Aug 22, 2010, at 8:52 AM, Chris wrote: > Hi > > Is there a way to parse the yaml reports on locally on the puppet > clients. What I'd like to offer our sysadmins is a command that will > give them some info when the last puppetrun was and whether anything > has changed. This could be included in .profile/.bashrc. We have an > environment where admins look after a their "own" machines. And it is > new that something like puppet ist allowed to interfer with "their" > systems so we are slowly getting used to the new situation. I do hope > that we will eventually move to a centralized reporting UI. We're just > not that far yet. > > > Thanks for any help > > > Chris > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Parsing yaml report locallly
hello, - "Chris" wrote: > Hi > > Is there a way to parse the yaml reports on locally on the puppet > clients. What I'd like to offer our sysadmins is a command that will > give them some info when the last puppetrun was and whether anything > has changed. This could be included in .profile/.bashrc. We have an > environment where admins look after a their "own" machines. And it is > new that something like puppet ist allowed to interfer with "their" > systems so we are slowly getting used to the new situation. I do hope > that we will eventually move to a centralized reporting UI. We're > just > not that far yet. I made a feature request so the report gets saved locally http://projects.reductivelabs.com/issues/4339 not sure how you'd get this information today -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Parsing yaml report locallly
Hi Is there a way to parse the yaml reports on locally on the puppet clients. What I'd like to offer our sysadmins is a command that will give them some info when the last puppetrun was and whether anything has changed. This could be included in .profile/.bashrc. We have an environment where admins look after a their "own" machines. And it is new that something like puppet ist allowed to interfer with "their" systems so we are slowly getting used to the new situation. I do hope that we will eventually move to a centralized reporting UI. We're just not that far yet. Thanks for any help Chris -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] extlookup in 2.6.1 defaults
On Sun, Aug 22, 2010 at 12:20 AM, Douglas Garstang wrote: > On Sun, Aug 22, 2010 at 12:02 AM, Joe McDonagh > wrote: >> On 08/22/2010 02:42 AM, Douglas Garstang wrote: >> >>> >>> This seems a bit weird to me. The second parameter isn't optional (I >>> think the 2nd and 3rd parameters should be switched), which means that >>> you MUST have a default value in there, which means, you might as well >>> use the same value as in the file, which means the file is somewhat >>> redundant. Anyone else see that? >>> >>> Doug. >>> >> >> extlookup has always supported defaults, which were always optional. A >> cursory look of the current code appears that it's also still an optonal >> default. > > Hmmm, I'm too tired to try that again, but the next problem is that I > want to be able to put these defaults in external files, but ALWAYS > override them with the value passed from an external node. It's more > specific after all. However, extlookup doesn't work like that. It only > uses the default passed directly to extlookup when it's NOT in the > files, therefore giving the files precedence. > > Doug. > Oh sweet jboss::instance { tfel0: version => $jboss_version, naming_port => 1099, cluster => "c0tfel0", java_heap_min => $tfel0_elementsJBossHeapMin ? { "" => extlookup("tfel0_elementsJBossHeapMin", extlookup("elementsJBossHeapMin", "", "appDefaults") ), default => "${tfel0_elementsJBossHeapMin}" }, cascading defaults! Wooo! Doug. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] extlookup in 2.6.1 defaults
On Sun, Aug 22, 2010 at 12:02 AM, Joe McDonagh wrote: > On 08/22/2010 02:42 AM, Douglas Garstang wrote: > >> >> This seems a bit weird to me. The second parameter isn't optional (I >> think the 2nd and 3rd parameters should be switched), which means that >> you MUST have a default value in there, which means, you might as well >> use the same value as in the file, which means the file is somewhat >> redundant. Anyone else see that? >> >> Doug. >> > > extlookup has always supported defaults, which were always optional. A > cursory look of the current code appears that it's also still an optonal > default. Hmmm, I'm too tired to try that again, but the next problem is that I want to be able to put these defaults in external files, but ALWAYS override them with the value passed from an external node. It's more specific after all. However, extlookup doesn't work like that. It only uses the default passed directly to extlookup when it's NOT in the files, therefore giving the files precedence. Doug. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] extlookup in 2.6.1 defaults
On 08/22/2010 02:42 AM, Douglas Garstang wrote: > > This seems a bit weird to me. The second parameter isn't optional (I > think the 2nd and 3rd parameters should be switched), which means that > you MUST have a default value in there, which means, you might as well > use the same value as in the file, which means the file is somewhat > redundant. Anyone else see that? > > Doug. > extlookup has always supported defaults, which were always optional. A cursory look of the current code appears that it's also still an optonal default. -- Joe McDonagh AIM: YoosingYoonickz IRC: joe-mac on freenode L'ennui est contre-révolutionnaire -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.