[Puppet Users] Custom function that requires a Ruby library module

2018-03-09 Thread Dirk Heinrichs
Hi, I'm trying to write a custom function to get the primary group of a given user. The following works in plain Ruby: def primary_group_of(user:) require 'etc' return Etc.getgrgid(Etc.getpwnam(user).gid).name end puts primary_group_of(user: 'username' ) Translated into a Puppet function,

Re: [Puppet Users] Custom function that requires a Ruby library module

2018-03-09 Thread Andreas Zuber
Is this user on the Puppet server/master? Because Puppet functions are evaluated there and never on the agent. Regards Andreas On 03/09/2018 01:04 PM, Dirk Heinrichs wrote: > Hi, > >   > > I’m trying to write a custom function to get the primary group of a > given user. The following works in p

Re: [Puppet Users] Custom function that requires a Ruby library module

2018-03-09 Thread Dirk Heinrichs
Von: zu...@puzzle.ch [mailto:zu...@puzzle.ch] > Is this user on the Puppet server/master? Because Puppet functions are > evaluated there > and never on the agent. OK, that's my mistake, then. So I'd better use a fact... Thanks for the hint. Bye... Dirk -- You received this message

[Puppet Users] Re: Can I use Puppet to run system updates?

2018-03-09 Thread 'Welsh1lad' via Puppet Users
Hi , I recently used puppet to upgrade a bunch of Centos 6.4 Machines to to centos 6.9 incl latest kernel . Problems are if you use yum , there is no guarantee that every server will have the same package if there is an update on the repository . So set up a webserver , mount the latest

[Puppet Users] Re: Resource chaining is not being honored

2018-03-09 Thread jcbollinger
On Thursday, March 8, 2018 at 4:53:27 PM UTC-6, Johnathan Komara wrote: > 'profile::a' should be applied to every server and 'profile::b' is only > being applied to a few servers. My understanding of resource chaining is > that I can alter the order in which the classes are ran. I need "b" t

[Puppet Users] Re: Resource chaining is not being honored

2018-03-09 Thread Johnathan Komara
I appreciate you taking the time to review my post and give such a thorough answer. Thank you, Johnathan On Friday, March 9, 2018 at 9:52:19 AM UTC-5, jcbollinger wrote: > > > > On Thursday, March 8, 2018 at 4:53:27 PM UTC-6, Johnathan Komara wrote: > > >> 'profile::a' should be applied to ev

[Puppet Users] How to require a define?

2018-03-09 Thread kmiller
Hello, I'm having a issue with getting the order of my module correct. I have the PostgreSQL db define block as so: postgresql::server::db { 'my_db': user => 'my_user', password => postgresql_password('my_user', 'my_pass'), } I've tried using: require => Class['postgresql::server::

Re: [Puppet Users] How to require a define?

2018-03-09 Thread Henrik Lindberg
On 09/03/18 23:56, kmil...@seismicgames.com wrote: Hello, I'm having a issue with getting the order of my module correct. I have the PostgreSQL db define block as so: | postgresql::server::db {'my_db':     user =>'my_user',     password =>postgresql_password('my_user','my_pass'), } | I've tr