Re: [Puppet Users] Access to one element from a yaml
On 2015-25-02 15:42, Fran Rodríguez wrote: Hi there, Some information is missing, sorry for that, this is the correct yaml: | nodes: host1: ip:xxx.xxx.xxx cdir:bbb.bbb.bbb interface:aaa host2: ip:yyy.yyy.yyy cdir:bbb.bbb.bbb interface:aaa | This yaml is declarated on a Foreman, we use Foreman like Hiera, and it uses for a template: | %=@nodes[0][name]% IPaddr2::%=@nodes[0]['ip']%/%=@nodes[0]['cidr']%/%=@nodes[0]['interface']-% | I assume that is not working. The yaml you outline means nodes is a hash, it has the keys 'host1', and 'host2'. so... @nodes['host1']['ip'] But, I guess that you do not know the name of the host and want to pick the first. The order in a hash is undefined, so you will be picking a random entry - it may not be the first entry you see in the yaml because it may change as it is read into memory. (This depends on which version of ruby you are using, and what kind of processing that has been made internally on the particular hash). If you want to get the first key, you could do this: key = @nodes.keys[0] and then @nodes[key]['ip'] - henrik And its defined on a manifest: | classheartbeat { template_resources ='site/heartbeat/resources.erb' } | I only need the first element to apply, in this case. Thanks for the fast answer. Cheers On Wednesday, 25 February 2015 15:15:50 UTC+1, LinuxDan wrote: More detail is needed to answer the question. Here are (I hope) some helpful suggestions: The data you list is a hash. How does one get the first element from a hash ? In what context are you trying to access the information ? Manifest ? Template ? No in Puppet at all ? One thing that caught my eye: The top-mose key of the hash is node while the template code says nodes. That could be the problem. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” (Bill Waterson: Calvin Hobbes) On Feb 25, 2015, at 08:52 AM, Fran Rodríguez fran.c@gmail.com javascript: wrote: Hi group, Im trying to get one element from a yaml structure which come from Foreman, the yaml is like this: node : host1 : ip : xxx . xxx . xxx host2 : ip : xxx . xxx . xxx Those parameter are used to in a template: %= @nodes [ 0 ][ name ] % IPaddr2:: %= @nodes [ 0 ][ 'ip' ] %/ %= @nodes [ 0 ][ 'cidr' ] %/ %= @nodes [ 0 ][ 'interface' ] - % The question is that i only need the first parameter, i tried some ways to do it but without any luck, so if someone could put me on the correct way or tell me what i would have to do. Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google..com/d/msgid/puppet-users/13ed1412-5807-424e-971e-284e588411c7%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/13ed1412-5807-424e-971e-284e588411c7%40googlegroups.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c9398100-1076-4f40-bf2c-bc0378008534%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/c9398100-1076-4f40-bf2c-bc0378008534%40googlegroups..com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- Visit my Blog Puppet on the Edge http://puppet-on-the-edge.blogspot.se/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/mcpubv%24ijh%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and-provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Dallas Fort-Worth Puppet User Group
If you need any help/tips/advice hit me up, we've had great luck with out Austin pug! On Friday, February 27, 2015 at 2:33:16 AM UTC-6, Brad Christian wrote: Hi, I've started the DFWPUG. Please go to http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Group http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Groupfor details, I'll be organizing a first meeting soon. Brad Christian @vhipster -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/08157976-90a5-480d-afd6-97820a7e01a3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] search facts by regex
On 2015-27-02 8:59, Alex Bogatu wrote: Hello! I spent the last couple of days trying to find a good way to search facts specific to some node based on ragex. For example, in my puppet manifest i need a way to check if there are facts whose names (not values) match a specific regex. Is there anyone who had this problem before? I know that it might be done using inline ruby code, but i wonder if there is no other solution. See here: https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#the-factsfactname-hash Then using the standard lib function keys() on $facts to get an array of the keys. You can then use the in operator to search. Alternatively use the standard lib function has_key($facts). If you are using parser=future you can also iterate over the hash's keys and values directly. - henrik -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f4c9d059-c989-4ea4-86f6-418e786f2f9b%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/f4c9d059-c989-4ea4-86f6-418e786f2f9b%40googlegroups..com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- Visit my Blog Puppet on the Edge http://puppet-on-the-edge.blogspot.se/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/mcptnu%247gp%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: No puppet for Juniper SRX series?
One possibility is that SRX-series routers use a weird MIPS port of FreeBSD (https://wiki.freebsd.org/FreeBSD/mips/Octeon) that may not have a Ruby port. The only references I could find were for OpenBSD. Not sure why a router would need ruby-qt, but it's there if you need it! On Thursday, February 26, 2015 at 9:19:24 AM UTC-8, Mauricio Tavares wrote: According to http://forums.juniper.net/t5/API-zation/Automation-with-Chef-Puppet-and-Ansible/ba-p/261773, only the QFX, EX, and MX family of routers and switches are supported by puppet. Can anyone confirm that the SRX routers are therefore left out in the rain? I did not get much of a reply in the Juniper forums. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/62d865a1-ddd0-4bb5-b95d-9c6fd7a2106b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Exec on a node causing action on another node?
On 02/27/2015 07:51 AM, Erling Ringen Elvsrud wrote: Do you think it is possible to handle this with Puppet? Yes, but not relying on exec as heavily as you imply. Your first step should be a custom fact that reports the state of the certificate. The manifest for the node examines the fact value and can decide to *export* an exec resource to whomever is expected to take action. Just so we're clear, if this is meant to refresh *puppet* certificates, then you are likely running in futile circles, or opening yourself up to grave security implications. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/54F09765.3040600%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Quick question about types/providers
Using the example of the file provider that is bundled with puppet here is a sniglet of code that I've zoomed in on: def mode if stat = resource.stat return (stat.mode 00).to_s(8) else return :absent end end def mode=(value) begin File.chmod(value.to_i(8), resource[:path]) rescue = detail error = Puppet::Error.new(failed to set mode #{mode} on #{resource[:path]}: #{detail.message}) error.set_backtrace detail.backtrace raise error end end can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv1VzxEgTLO8xv44GcPA0FKboQgEhVTLe%3DM2%2BY%2BMTO%2BAqQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Geppetto 4.x download is broken
Brian, Geppetto 4.x downloads can be found at https://downloads.puppetlabs.com/geppetto/4.x. I'll update the wiki with the correct location. Hope that helps. On Fri, Feb 27, 2015 at 11:25 AM, Brian Morris nomadicextre...@gmail.com wrote: When attempting to access http://puppetlabs.github.io/geppetto/download.html in any of 3 browsers on 2 platforms this error is generated: (In Chrome) This webpage has a redirect loop (In Firefox) The page isn't redirecting properly Additionally, the alternate link given on https://github.com/puppetlabs/geppetto/wiki for the download: https://downloads.puppetlabs.com/geppetto/downloads ... results in a 404: Not Found The requested URL /geppetto/downloads was not found on this server. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a2190e8e-a02c-4152-be5a-2094494bcd99%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Matthaus Owens Puppet Labs Join us at PuppetConf 2015, October 5-9 in Portland, OR - http://2015.puppetconf.com. Register early to save 40%! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcH_j00rvmz9UizupCyQZxCAv18bq22oxX%3DEWW0r04heQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
So, I wrote my type and its provider. Have a bunch of params and of course the first one I try to use newparam(:ipv4listen) do desc the ipv4listen param end doesn't seem to be seen by the Puppet infrastructure. Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at /etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22 on node CLIENT Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run So obviously I'm missing something here... Thoughts? Wish there was an equivalent to Perl's Data::Dumper that would let me see what parameters Puppet things are defined. On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and-provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv3hgXjYxbr0MeunP-M5dNnFZchKNT3fJ%2B8MYTOep5bqGA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: first custom type... in the weeds already
On Thursday, February 26, 2015 at 10:02:59 AM UTC-6, Salty Old Cowdawg wrote: Puppet::Type.newtype(:bannerfile) do newparam(:name)do end newparam(:bannertext)do end newparam(:bannertext2)do end end but a name variable is being defined and I'm still seeing the issue. Be certain to restart the master every time you change your type. Once the master loads a version of your type, it cannot unload it or replace it. Additionally, it's a bit strange that your type has only parameters, and no properties. Your 'bannertext' and 'bannertext2' sound likely to be more appropriate as properties -- that is, they sound like they correspond to specific measurable, changeable aspects of the things a 'Bannerfile' models. If so, then you should declare them with 'newproperty' instead of 'newparam', and getters and setters for them should be implemented by your provider(s). As far as I know, however, that should not factor in to the error message you reported previously. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4f4450bc-00aa-4108-81de-77f6fb19aba2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Geppetto 4.x download is broken
When attempting to access *http://puppetlabs.github.io/geppetto/download.html* in any of 3 browsers on 2 platforms this error is generated: (In Chrome) This webpage has a redirect loop (In Firefox) The page isn't redirecting properly Additionally, the alternate link given on https://github.com/puppetlabs/geppetto/wiki for the download: https://downloads.puppetlabs.com/geppetto/downloads ... results in a 404: Not Found The requested URL /geppetto/downloads was not found on this server. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a2190e8e-a02c-4152-be5a-2094494bcd99%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
I think I discovered something, correct me if I'm in the weeds with this. Seems certain patterns cannot be used as parameters for a type. So far on my list version ipv4listen rndcport that last one baffles me. bindconfigure { $mypersonality: # ipv4listen=any, ipv6listen=any, # rndcport=951, statsport=8080, named='-n 2', ztp=no, m_notify=no, transfer=none, version='9.9.5-S1', state=on, notify= Service['named-all'] } anybody see anything objectionable here? On Fri, Feb 27, 2015 at 2:21 PM Peter Berghold salty.cowd...@gmail.com wrote: So, I wrote my type and its provider. Have a bunch of params and of course the first one I try to use newparam(:ipv4listen) do desc the ipv4listen param end doesn't seem to be seen by the Puppet infrastructure. Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at /etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22 on node CLIENT Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run So obviously I'm missing something here... Thoughts? Wish there was an equivalent to Perl's Data::Dumper that would let me see what parameters Puppet things are defined. On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and- provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ms gid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg %40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv% 3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0zZ0DLgoLO6-6PfXuxays2TQrft2xHbMatwP80K1TFeA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Dallas Fort-Worth Puppet User Group
Hi, I've started the DFWPUG. Please go to http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Group http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Groupfor details, I'll be organizing a first meeting soon. Brad Christian @vhipster -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b7c04dc2-df5c-4275-9509-8ac163eae74c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] search facts by regex
Hello! I spent the last couple of days trying to find a good way to search facts specific to some node based on ragex. For example, in my puppet manifest i need a way to check if there are facts whose names (not values) match a specific regex. Is there anyone who had this problem before? I know that it might be done using inline ruby code, but i wonder if there is no other solution. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f4c9d059-c989-4ea4-86f6-418e786f2f9b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Update package (latest) only if installed in Debian
Thanks a lot everyone for the answers! I will try to go for the /usr/bin/apt-get install --only-upgrade package-name but maybe outside of puppet. Cheers, Ximena. --- *Ximena E. Cardinali *| Linux Systems Administrator Mobile: +49-1514-72-96-542 | Skype: ximena_cardinali E-mail: ximenacardin...@gmail.com | Blog: http://ximunix.blogspot.com/ On 25 February 2015 at 11:49, Raphink raph...@gmail.com wrote: Hello, It seems that you're trying to use Puppet for actions (upgrading packages not managed by Puppet) instead of state. This is not what Puppet is for. You might want to setup unattended-upgrades with the proper Allowed-Origins and let the system upgrade the packages for you. Cheers, Raphaël On Tuesday, February 24, 2015 at 4:28:32 PM UTC+1, Ximena Cardinali wrote: Hello There, I'm trying to write a module to update certain vulnerable packages in Debian Systems. My idea is to update them only and only if they are *installed*. Is there any exec command or any other tricks that you may know to do that? So far, I've got the basics: :$ package { '$package_update': name= $package_update, ensure = latest, } Can anyone throw me an idea? I will really appreciate it! Cheers, Ximena. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/MhmLUXre2CI/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ebbcf94b-079f-4ea3-9bb4-7f35b45672a9%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/ebbcf94b-079f-4ea3-9bb4-7f35b45672a9%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJsWqD2Q2drBsNrE0Gu7eMFQ_QpnPLwqiksSffQaBAbmwE79mw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: delete line in file with substring xyz
Hi, it is a shame, that file_line is not able to delete line on the basis of a substing. Currently I use this to delete a line exec { /usr/bin/perl -ni -e '/${line}/ or print' '${file}': onlyif = ${grep} -qF '${line}' '${file}' } Best regards Andreas Am Donnerstag, 26. Februar 2015 15:52:22 UTC+1 schrieb jcbollinger: On Thursday, February 26, 2015 at 2:39:51 AM UTC-6, Andreas Dvorak wrote: Hi, I have just tried the stdlib version 4.5.1. According to the change log with version 4.5.0 Don't require line to match the match parameter But my test does not work file_line {'test': ensure = 'absent', path = '/root/.ssh/authorized_keys', match = 'test', } Error: Failed to apply catalog: Validation of File_line[test] failed: Both line and path are required attributes at /data/git/test/modules/accounts/manifests/del_key_in_root.pp:204 Wrapped exception: Both line and path are required attributes You could solve that issue by providing a 'line' property with a dummy value, as in some of your previous attempts. Alas, although that should prevent the exception, it will not get you to where you want to be. File_line doesn't do that. The key thing to understand here is that File_line represents a *specific* line in a file. The 'match' parameter is *not* about recognizing that line, it is about how to introduce it into the file if that is necessary. When you ensure a File_line 'absent', you are saying that the file identified by it's 'path' should not contain any line that is an exact, character-for-character match to the 'line' parameter (because *that* is what the resource represents). For SSH authorized keys in particular, you should look into the built-in Ssh_authorized_key resource type. More generally, if there is not already a module or built-in resource type specific to the file you're trying to manage, and you don't want to create one, then the more-or-less universal fallback is an Exec resource. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c2b87e1d-dfd4-4073-b934-2c65d257c5a8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.