[Puppet Users] Optional / mutually exclusive resource parameters with the Puppet Resource API

2019-12-04 Thread Benjamin Ridley
Hi all, I'm developing a resource that allows the declaration of keys in the Etcd key value store. My type looks like this: Puppet::ResourceApi.register_type( name: 'etcd_key', docs: 'This type allows the management of etcd keys as Puppet resources.', attributes: { ensure: { t

Re: [Puppet Users] Optional / mutually exclusive resource parameters with the Puppet Resource API

2019-12-05 Thread Benjamin Ridley
gt; `set`/`create`/`update`/`delete` get called. throwing an exception from > those methods will tell puppet that the resource application failed and > present the exception message to the user. > > > Regards, David > > On Wed, 4 Dec 2019 at 16:34, Benjamin Ridley > wrote: > &

Re: [Puppet Users] How to get value

2020-06-23 Thread Benjamin Ridley
Defined types values exist in a 'local scope' which is only accessible to its child scopes, so there's no way to access these values using the method you're using for class variables (which are inside a named scope). On Tue, 23 Jun 2020, 8:15 pm Albert Shih, wrote: > Hi everyone, > > I use a lot

Re: [Puppet Users] Is it possible to create an array of hashes

2020-08-26 Thread Benjamin Ridley
Hi Raghu, Yes this is possible. Your example looks workable, but don't forget to add commas after the values of the hash. Check out Puppet's 'reduce' function, it iterates over data and allows you to return a new structure after all the iteration which could be your new hash. Alternatively it mig

Re: [Puppet Users] init config once

2021-01-28 Thread Benjamin Ridley
You might be better off using something like Puppet Bolt to deploy the file as a one off task at provisioning, rather than trying to manage it declaratively through Puppet. On Fri, 29 Jan 2021, 3:50 pm Steve McKuhr, wrote: > In an effort to avoid errors triggered by validate_cmd, I ended up usin

Re: [Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Benjamin Ridley
Hi Erwin and Martin, I think there's a difference here - Erwin it seems you're trying to do nested interpolation, while Martin it appears your example is for lookups nested in hiera data. Erwin as far as I'm aware, nested interpolation in the manner you suggest is not possible. At least I've not

Re: [Puppet Users] SSLv3 alert certificate unkown

2022-01-12 Thread Benjamin Ridley
I've had this happen to me before, and usually it was because there was something more fundamental going wrong with the Puppet Server that was causing connection issues, and the SSLv3 thing is just a red herring. In our case, we ended up having CPU contention issues which was causing really bad Pu