[Puppet Users] passing arguments by name instead of position for functions

2023-10-23 Thread 'Matt Zagrabelny' via Puppet Users
Hello, I have a variety of hashes that have similar content: $h = { 'foo1' => 'bar', [...] 'foo99' => 'baz', 'foo100' => 'h', } $g = { 'foo1' => 'bar', [...] 'foo99' => 'baz', 'foo100' => 'g', } I'd like to have a function or similar mechanism: $h = helper_modul

Re: [Puppet Users] hiera 5 postgresql backend

2022-04-15 Thread 'Matt Zagrabelny' via Puppet Users
On Fri, Apr 15, 2022 at 12:34 PM Matt Zagrabelny wrote: > Hi Martin, > > Thanks for the email. I understand your concerns about using other > backends. We have a reasonably small puppet deployment, so I think I will > try a DB based backend and see how it performs. > > In that light, I've downloa

Re: [Puppet Users] hiera 5 postgresql backend

2022-04-15 Thread 'Matt Zagrabelny' via Puppet Users
write new backends. > Please note that the hiera3 backends are not compatible with hiera5! > https://puppet.com/docs/puppet/7/hiera_custom_backends.html > > Hth, > Martin > > > On 14. Apr 2022, at 04:30, 'Matt Zagrabelny' via Puppet Users < > puppet-users@

[Puppet Users] hiera 5 postgresql backend

2022-04-13 Thread &#x27;Matt Zagrabelny&#x27; via Puppet Users
Greetings, I'm running puppet 5.5. Is anyone aware of a hiera 5 Pg backend? I've tried getting the hiera 3 module [0] working, but am struggling. I'm hoping a native hiera 5 will be a smoother experience. Thanks for the help! -m [0] https://github.com/rogeduardo/hiera-psql -- You received t

Re: [Puppet Users] boolean like operation for puppetdb query

2022-02-16 Thread &#x27;Matt Zagrabelny&#x27; via Puppet Users
> ❯ cat profile/facts.d/fail2ban.sh > #!/bin/sh > FAIL2BAN="/usr/bin/fail2ban-client" > [ -x ${FAIL2BAN} ] && echo fail2ban_version=$(/usr/bin/fail2ban-client > --version) > > ❯ cat profile/manifests/test3.pp > class profile::test3 { > if $facts["

[Puppet Users] boolean like operation for puppetdb query

2022-02-11 Thread &#x27;Matt Zagrabelny&#x27; via Puppet Users
Greetings, I have a puppetdb installation that I leverage by querying from my manifests. I'd like to have a boolean-like operation for puppetdb that pretty much tests if the current node has a given class as part of the catalog. Here is my current code: $query = [ 'resour

[Puppet Users] hiera resources in puppetdb

2022-01-12 Thread &#x27;Matt Zagrabelny&#x27; via Puppet Users
Greetings, I use lookup to get data out of hiera: node some-host { class { 'foo': $bar = lookup('bar') } } I'd like to be able to query puppetdb to find out what hosts use various hiera keys. So in the above example. Given bar return some-host. I know I can write a parser to g