Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread Hunter Haugen
On Tue, Aug 11, 2015 at 12:57 PM wrote: > So, found another wrinkle in this: > > If the resource doesn't exist on the system yet, and I leave the servers > attribute out, my validate doesn't catch it: > > mytype{'test type': > # servers => ['server1','server2'] > } > > That should fail the catalo

Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread jwilkicki
So, found another wrinkle in this: If the resource doesn't exist on the system yet, and I leave the servers attribute out, my validate doesn't catch it: mytype{'test type': # servers => ['server1','server2'] } That should fail the catalog compile since servers is required and it isn't set. My

Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread jwilkicki
Okay, so if I understand you right, validate gets called twice: once without the self hash initialized and once with it initialized. Seems weird, but I can follow that.So, I might want to do something like: if(self[:servers]) fail("Servers must be an array with at least one member") un

[Puppet Users] Error when creating user in OS X

2015-08-11 Thread Henrik Georgson
Hi, I'm new to puppet and are setting up an environment for our Macs. I've been creating a module that are creating a local admin on each computer. The user get created but I keep getting this error: "Could not prefetch user provider 'directoryservice': undefined method `[]' for nil:NilClass"

Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread Hunter Haugen
On Fri, Aug 7, 2015 at 1:48 PM wrote: > Hi all! > > I'm having trouble with a custom type's type-wide validate call. I've > done a lot of digging into the Puppet documentation and a lot of Googling > and haven't found a lot of guidance. My Puppet version is 3.7.5. > > Basically, I have a prope

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-11 Thread Eddie Mashayev
Thanks for the help :) On Tuesday, August 11, 2015 at 1:24:48 AM UTC+3, Richard Gray wrote: > > > > On 10/08/15 20:12, Martin Alfke wrote: > > You need to create a hiera.yaml config file. > The config file may look like this: > > :backends: > - yaml > :yaml: > :datadir: ‘/etc/puppet/data’ > :h

[Puppet Users] How to ensure the file transferred is identical to the source?

2015-08-11 Thread Danny Tung
If I use the "FILE" resource to stage a file from the puppet master to an agent node, does Puppet ensure that the file is transferred successfully? I noticed that puppet's report that the file checksum is changed to a new checksum value if it is replacing the existing file or it is a brand new