Re: [Puppet Users] Re: [facter]Bug can't get : ipaddress_ethX
I have upgraded my facter version : facter --version 1.6.9 It's now working like a charm Thx. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4729ePmYnU4J. To post to this group, send email to puppet-users@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] Re: [facter]Bug can't get : ipaddress_ethX
*facter --version* *1.5.7* 2012/11/28 Matthaus Owens > Which facter version are you seeing this on? (`facter --version`) > > On Wed, Nov 28, 2012 at 9:14 AM, AnOnJoe wrote: > > sorry there is a typo : > > > > Le mercredi 28 novembre 2012 18:06:54 UTC+1, AnOnJoe a écrit : > >> > >> Hello, > >> I have a problem with facter : > >> > >> eg: > >>> > >>> facter |grep ipaddress_eth1 > >>> ipaddress_eth1 => 192.168.0.254 > >> > >> works > >> > >> but > >>> > >>> facter ipaddress_eth1 > >> > >> return nothing > >> > >> Do you know how I can work with this ? > >> > >> thx > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/puppet-users/-/db0413060ncJ. > > > > To post to this group, send email to puppet-users@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. > > > > -- > Matthaus Owens > Release Manager, Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@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-users@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: [facter]Bug can't get : ipaddress_ethX
sorry there is a typo : Le mercredi 28 novembre 2012 18:06:54 UTC+1, AnOnJoe a écrit : > > Hello, > I have a problem with facter : > > eg: > >> facter |grep ipaddress_eth1 >> ipaddress_eth*1* => 192.168.0.254 >> > works > > but > >> facter ipaddress_eth1 >> > return nothing > > Do you know how I can work with this ? > > thx > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/db0413060ncJ. To post to this group, send email to puppet-users@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] [facter]Bug can't get : ipaddress_ethX
Hello, I have a problem with facter : eg: > facter |grep ipaddress_eth1 > ipaddress_eth0 => 192.168.0.254 > works but > facter ipaddress_eth1 > return nothing Do you know how I can work with this ? thx -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/gscIz-LmC3oJ. To post to this group, send email to puppet-users@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: [hiera] Hierarchy modification takes long time to be effective
Thx, i'm feeling stupid, it was that Le mercredi 28 novembre 2012 15:41:53 UTC+1, llowder a écrit : > > > > On Wednesday, November 28, 2012 8:38:37 AM UTC-6, AnOnJoe wrote: >> >> Hello, >> >> I've something strange : >> When I modify my hierarchy in my hiera.yaml, it can take up to several >> hours, for the modification to work. >> >> eg : I create a subdir in my hieradata, move all the concerned files >> into, modify my hiera.yaml >> >>> from : >>> :hierarchy: >>> - %{operatingsystem} >>> >> >> to : >> >>> :hierarchy: >>> - *os/*%{operatingsystem} >>> >> >> but the changes don't work immediatly. >> >> > > Did you restart your master? > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/i6EkEJsVkq8J. To post to this group, send email to puppet-users@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] [hiera] Hierarchy modification takes long time to be effective
Hello, I've something strange : When I modify my hierarchy in my hiera.yaml, it can take up to several hours, for the modification to work. eg : I create a subdir in my hieradata, move all the concerned files into, modify my hiera.yaml > from : > :hierarchy: > - %{operatingsystem} > to : > :hierarchy: > - *os/*%{operatingsystem} > but the changes don't work immediatly. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/_XXDRci826kJ. To post to this group, send email to puppet-users@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: What is the best way for creating users in puppet/hiera ?
thx Elison, my users are now created via the create_resources function, and it works like a charm. and thx jcbollinge, you show me the right way in using puppet/hiera. I have now a lot of work to normalize my modules ;-) Le lundi 26 novembre 2012 20:20:12 UTC+1, jcbollinger a écrit : > > > > On Monday, November 26, 2012 5:00:17 AM UTC-6, AnOnJoe wrote: >> >> Hello, >> I have recently discover hiera, and I would like to use it for creating >> users on my node. >> >> I first think of someting like that : >> >> >> common.yaml >> >>> lusers : - jodoe >>> - jadoe >>> >> classes : - users >>> >> >> >> serv01.foo.com.yaml >> >>> lusers : - Alice >>> - Bob >>> >> >> >> modules/users/manifest/init.pp >> >>> define users ($user = hiera("$lusers")) { >>> user { "$user": >>> ensure => present, >>> shell => '/bin/bash', >>> home=> "/home/$user", >>> managehome => true, >>> } >>> } >>> >> >> But I don't know how I can call my def type like that. >> >> What about you ? How do you create your users in puppet / hiera ? >> >> > > A module's init.pp, if non-empty, should contain only the definition of a > class (not a definition) sharing the name of the module. That's what you > want in this case anyway: > > modules/users/manifests/init.pp: > > class users { > $users = flatten(hiera_array('lusers')) > user::user { $users: } > } > > > modules/users/manifests/user.pp > > define user::user () { > user { "$name": > ensure => present, > shell => '/bin/bash', > home => "/home/$name", > managehome => true > } > } > > > Notes: > >1. To collect values for the same key from multiple levels of your >data hierarchy, you need to use either hiera_array() or hiera_hash(). The >plain hiera() function will give you only the value from the >highest-priority level. >2. The flatten() function comes from the "stdlib" add-on module. You > would >need it in the example because, with the data as given, hiera_array() will >return an array of arrays, whereas you want a single array whose elements >are the usernames. >3. The only reason you need a defined type is that you want to >explicitly declare the home directory name based on the username. If none >of the properties were derived from the username then you could just use >native User resources directly. >4. All quoting (and non-quoting) in the example is exactly as you >should have it. In several cases, adding quotes or changing the quote > type >will change the meaning. >5. You would use the example by via "include 'users'" > > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/g33IHWw3G44J. To post to this group, send email to puppet-users@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] What is the best way for creating users in puppet/hiera ?
Hello, I have recently discover hiera, and I would like to use it for creating users on my node. I first think of someting like that : common.yaml > lusers : - jodoe > - jadoe > classes : - users > serv01.foo.com.yaml > lusers : - Alice > - Bob > modules/users/manifest/init.pp > define users ($user = hiera("$lusers")) { > user { "$user": > ensure => present, > shell => '/bin/bash', > home=> "/home/$user", > managehome => true, > } > } > But I don't know how I can call my def type like that. What about you ? How do you create your users in puppet / hiera ? Thx -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/yywCgTGmJAwJ. To post to this group, send email to puppet-users@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: Best Practices on node declaration
Thank you very much guys. Hiera saved my life ;-) Le mercredi 21 novembre 2012 18:46:06 UTC+1, AnOnJoe a écrit : > > Hello, > > I would like to know what are the best pratices in node declaration. > > I tried to play with inheritance with failures : > Here my* puppet/manifest/site.pp* > > node basenode { >> class { 'ssh': } >> class { 'ntp': } >> class { 'users': } >> class { 'sudo': } >> } >> >> node default inherits basenode { >> } >> >> >> # serv1 >> >> node "serv1" inherits basenode { >> class { 'sudo' : >> sudoers => "sudoers_serv1" >> } >> class { 'debug': } >> } >> > > As you can see i have to manage 2 sudoers file : > One in almost all server, and an other one in my "serv1" server > > here is my *sudo class* > > class sudo ($sudoers="sudoers") { >> package { 'sudo': >> ensure => installed, >> } >> file { '/etc/sudoers': >> source => "puppet://puppetmaster.foo.com/sudo/$sudoers", >> ensure => file, >> mode => 440, >> owner => 'root', >> group => 'root', >> require => Package['sudo'], >> } >> } >> > > > Can you tell me what is the best way to resolve that kind of problems. > > Thx > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Q416Qk8wJgYJ. To post to this group, send email to puppet-users@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] Best Practices on node declaration
Hello, I would like to know what are the best pratices in node declaration. I tried to play with inheritance with failures : Here my* puppet/manifest/site.pp* node basenode { > class { 'ssh': } > class { 'ntp': } > class { 'users': } > class { 'sudo': } > } > > node default inherits basenode { > } > > > # serv1 > > node "serv1" inherits basenode { > class { 'sudo' : > sudoers => "sudoers_serv1" > } > class { 'debug': } > } > As you can see i have to manage 2 sudoers file : One in almost all server, and an other one in my "serv1" server here is my *sudo class* class sudo ($sudoers="sudoers") { > package { 'sudo': > ensure => installed, > } > file { '/etc/sudoers': > source => "puppet://puppetmaster.foo.com/sudo/$sudoers", > ensure => file, > mode => 440, > owner => 'root', > group => 'root', > require => Package['sudo'], > } > } > Can you tell me what is the best way to resolve that kind of problems. Thx -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/zoT3tKXyIUcJ. To post to this group, send email to puppet-users@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 increment variable in erb template ?
I've got it : Compteur <%= compteur %> > *<% compteur = compteur.to_i -%>* > <% compteur += 1 -%> > Compteur <%= compteur %> > Le mardi 24 avril 2012 15:38:28 UTC+2, AnOnJoe a écrit : > > Hi', > > I'm looking for a way to increment variable in template (erb file). > > I tried this, but it didn't work > > Compteur <%= compteur %> >> <% compteur = compteur + 1 %> >> Compteur <%= compteur %> >> > > I've got this error : > >> Error 400 on SERVER: Failed to parse template test/test.erb: undefined >> method `+' for nil:NilClass >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/7uZXvneHYQkJ. To post to this group, send email to puppet-users@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] How to increment variable in erb template ?
Hi', I'm looking for a way to increment variable in template (erb file). I tried this, but it didn't work Compteur <%= compteur %> > <% compteur = compteur + 1 %> > Compteur <%= compteur %> > I've got this error : > Error 400 on SERVER: Failed to parse template test/test.erb: undefined > method `+' for nil:NilClass > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/UJeLGDu-GxAJ. To post to this group, send email to puppet-users@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.