Re: [Puppet Users] Hiera: Using mapped_paths with a hashmap

2024-09-04 Thread 'Dirk Heinrichs' via Puppet Users
Am Mittwoch, dem 04.09.2024 um 10:00 + schrieb 'Dirk Heinrichs' via Puppet Users: However, if the given fact is a hash, then - name: Foo mapped_paths: [facts.foo, name, "foo/%{name}.yaml"] Got it: The path template must look like "foo/%{name.0}.yaml" to access the key. Bye... Dirk

[Puppet Users] Hiera: Using mapped_paths with a hashmap

2024-09-04 Thread 'Dirk Heinrichs' via Puppet Users
Hi, the Hiera documentation says that the "mapped_paths" method can be used with either an Array or Hash: "A fact that is a collection (array or hash) of values. Hiera expands these values to produce an array of paths." Using it with an Array is quite easy, since the documentation also has an

Re: [Puppet Users] hiera, template and array

2023-03-30 Thread Laci D
*puppetlabs-ntp* doesn't support FreeBSD. I do use this module to manage ntp on Ubuntu. On Wednesday, March 29, 2023 at 4:44:21 PM UTC-4 LinuxDan wrote: > Silly question: Why not use > https://forge.puppet.com/modules/puppetlabs/ntp ? > ___ >

Re: [Puppet Users] hiera, template and array

2023-03-29 Thread 'Dan White' via Puppet Users
Silly question: Why not use https://forge.puppet.com/modules/puppetlabs/ntp ? ___ Dan White : d_e_wh...@icloud.com “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact

Re: [Puppet Users] hiera, template and array

2023-03-29 Thread Laci D
The following configuration is finally working, yay! I replaced "servers" with "*ntp_host*" in hiera to have a clean separation between "server" and "servers". Thank you for the help! templates/ntp/ntp.conf.erb # File is managed by Puppet <% if @ntp['ntp_host'] -%> server <%= @ntp['ntp_host']

Re: [Puppet Users] hiera, template and array

2023-03-29 Thread Martin Alfke
In EPP the template must look different: <% $site::profiles::ntp::ntp[‘servers'].each |$server| { -%> server: <%= $server %> <% } -%> An array may consist of a single entry only. > On 28. Mar 2023, at 16:30, Laci D wrote: > > I tried both epp and erb templates. > > This is the manifest file:

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread Laci D
I tried both epp and erb templates. This is the manifest file: class site::profiles::ntp { $ntp = hiera_hash('ntp') case $::operatingsystem { 'freebsd': { file { "/etc/ntp.conf": ensure => file, recurse => true,

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread Martin Alfke
My example is an epp template. What name does the variable have? $ntp? And: is this a hash with servers key set to an array? In this case your erb (!) template can look like the following: <% @ntp[’servers’].each { |server| -%> server: <%= server %> <% } -%> > On 28. Mar 2023, at 14:37, Laci D

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread 'Dirk Heinrichs' via Puppet Users
Am Dienstag, dem 28.03.2023 um 05:37 -0700 schrieb Laci D: Since "servers" is under "ntp" in the hiera file (see example in my original email) maybe we need to define that in the erb file? I think the example is slightly wrong. Should IMHO be "@servers" and then just "server" (without the leadi

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread Laci D
Thank you Martin! I used your example and I think something is missing. Since "servers" is under "ntp" in the hiera file (see example in my original email) maybe we need to define that in the erb file? Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server E

Re: [Puppet Users] hiera, template and array

2023-03-27 Thread Martin Alfke
You must iterate as servers is an array: <% $servers.each |$server| { -%> server: <%= $server %> <%- } -%> > On 27. Mar 2023, at 22:21, Laci D wrote: > > I'm working on defining NTP servers from Hiera. > > For Linux servers I have been using puppetlabs-ntp, which has been working > nicely. No

[Puppet Users] hiera, template and array

2023-03-27 Thread Laci D
I'm working on defining NTP servers from Hiera. For Linux servers I have been using *puppetlabs-ntp*, which has been working nicely. Now I need to add support for FreeBSD. Above module doesn't support FreeBSD but I can edit ntp.conf with *file* resource type. This is where things got complicat

Re: [EXTERNAL] - Re: [Puppet Users] Hiera 5 and Deferred / Sensitive

2022-11-02 Thread 'Dirk Heinrichs' via Puppet Users
Am Mittwoch, dem 02.11.2022 um 00:21 -0700 schrieb Aaron Russo: There is petems-hiera_vault which is close -- Didn't know thi

Re: [Puppet Users] Hiera 5 and Deferred / Sensitive

2022-11-02 Thread Aaron Russo
If you're referring to hiera-eyaml-vault , that's not pulling secrets out of Vault -- it's using the transit encryption provider in place of gpg keys and storing those in yaml. It's a neat approach but not what I'm looking for. There is petems-hiera_

Re: [Puppet Users] Hiera 5 and Deferred / Sensitive

2022-11-01 Thread 'Dirk Heinrichs' via Puppet Users
Am Freitag, dem 21.10.2022 um 11:49 -0700 schrieb Aaron Russo: However it feels like an anti-pattern by forcing lookups into our manifests when we want to keep that in Hiera. I found a previous related thread[2] where Henrik suggested writing a custom backend for Hiera and return a Deferred. hi

Re: [Puppet Users] Hiera 5 and Deferred / Sensitive

2022-10-31 Thread Aaron Russo
Closing the loop on this for anyone else trying this in the future. The custom backend was correct the entire time and was returning the Deferred function. However since I was defining a key prefix that wasn't actually used in Hiera for the custom backend to key off of, I was making use of the

Re: [Puppet Users] Hiera 5 and Deferred / Sensitive

2022-10-31 Thread Aaron Russo
So I managed to get this to work by changing hiera data slightly, replacing the `lookup` function with `alias` so that the type wasn't automatically converted to a string. ``` # this works! note the weird quoting is to avoid hiera treating fqdn dots as sub-keys and is intentional. profile::gitlab_

[Puppet Users] Hiera 5 and Deferred / Sensitive

2022-10-21 Thread Aaron Russo
We're using the vault_lookup[1] module to retrieve secrets from Vault via mTLS. It works fairly well when grabbing secrets within a manifest. However it feels like an anti-pattern by forcing lookups into our manifests when we want to keep that in Hiera. I found a previous related thread[2] wher

Re: [Puppet Users] Hiera values in provider

2022-08-02 Thread Matthias K
Thank you for the example. Right now I'm going a different route to avoid having to store the password locally in plaintext and switched to an approach where I parse and filter the output of "dnf repolist" which is "good enough" for our current usecase, but I will look into the nexus provider a

Re: [Puppet Users] Hiera values in provider

2022-08-01 Thread 'Dirk Heinrichs' via Puppet Users
Am Montag, dem 01.08.2022 um 12:47 -0700 schrieb Matthias K: > The provider subscribes and unsubscribes yum repo channels through a > remote xmlrpc interface. To do this we need a username and password, > this is part of the defined resource and comes from hiera. This is > fine for creating the re

Re: [Puppet Users] Hiera values in provider

2022-08-01 Thread Matthias K
Thank you. I was expecting something like that :-/ Your described process is in general what we are doing with all of our custom providers. Unfortunately, in this case, we have something "special". The provider does not manage anything which can be accessed locally from the system. The provide

Re: [Puppet Users] Hiera values in provider

2022-08-01 Thread Ben Ford
Not directly. Hiera provides data to the server for use when compiling the catalog. Providers run on the agent after the catalog has been compiled. If you need to get to Hiera data, write your type/provider such that it accepts a parameter, then look that up from Hiera and pass it in when you decl

[Puppet Users] Hiera values in provider

2022-08-01 Thread Matthias K
Hi, is it possible to access hiera values within a custom provider? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To

[Puppet Users] Hiera Data Manager Demo available

2022-07-28 Thread Martin Alfke
Hi everyone, we would like to introduce our Hiera Data Manager - HDM. HDM is made available under an Open Source License and offers a web interface to analyze Hiera Data. Further information are available on the project website: https://github.com/betadots/hdm

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
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 downloaded a hiera-mysql2 module from github and installed it at: # tree /us

Re: [Puppet Users] hiera 5 postgresql backend

2022-04-13 Thread Martin Alfke
Hi, We usually recommend to not use any other backend, except for file based backends, due to performance. Any other backend must be able to deliver the same lookup speed. We did a calculation at a customer and we saw hiera answering 8000 queries in less than 1 second using the yaml file backend

[Puppet Users] hiera 5 postgresql backend

2022-04-13 Thread 'Matt Zagrabelny' 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

[Puppet Users] Hiera recursive lookup problem

2022-03-18 Thread Michele Manzato
Hi, I've got a problem with Hiera interpolation (lookups). I'm fairly new to Hiera, so I think I am misunderstanding something important, but doc searches revealed nothing so far. I'm using Puppet 7.x with the following hiera.yaml: # hiera.yaml --- version: 5 hierarchy: - name: "Per-node data"

[Puppet Users] hiera resources in puppetdb

2022-01-12 Thread 'Matt Zagrabelny' 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

Re: [Puppet Users] Hiera value and using looping on it

2021-12-16 Thread 'Dirk Heinrichs' via Puppet Users
Am Mittwoch, dem 15.12.2021 um 22:53 -0800 schrieb Tejas Bhosale: I have heira value as an example as ``` profile::candy::virtualhosts: abc.example.com: listen: '80' location: [v1, v2] backend_port: [3000, 3001] ``` Use profile::candy::virtualhosts: - name: abc.exacmple.com

[Puppet Users] Hiera value and using looping on it

2021-12-16 Thread Tejas Bhosale
Hi, I have heira value as an example as ``` profile::candy::virtualhosts: abc.example.com: listen: '80' location: [v1, v2] backend_port: [3000, 3001] ``` Can anyone tell me how can i loop it to create nginx config along with locations setup i am able to create virtual host config u

Re: [Puppet Users] Hiera driving me round the bend

2021-10-14 Thread David Murphy
OK - I think my naming is a little confusing but I don't think that I am confusing the two - although I totally could be, The problem for me seems to be that the facts that the client should be passing through to the server don't seem to be handled properly. The way I'm trying to determine th

Re: [Puppet Users] Hiera driving me round the bend

2021-10-14 Thread Martin Alfke
Hi David, You seem to mix up hiera and facts. Your node has facts: --- derivedsite: 'cp1' hostdb: role: 'development' businessowner: ‘Infrastructure' attributes: - 'DNS-Slave' - 'Oracle' applicationlist: - ‘test' Now hiera jumps in (hiera.yaml file) and uses the facts

[Puppet Users] Hiera driving me round the bend

2021-10-11 Thread David Murphy
Hi Guys, You have to forgive this but it’s driving me nuts. I thought I understood the way that Hiera worked and trying to get it to work in the way I expect has had me seriously doubting myself. My hiera.yaml looks like this *---* *# Hiera 5 Global configuration file* * version: 5*

Re: [Puppet Users] hiera merge lookup/alias of array defined at multiple levels

2021-09-03 Thread Mark Dixon
Hi Dirk, Thanks so much for that, adding lookup_options in common.yaml worked :) Ideally I'd like to put the setting as an argument to %{lookup()} or %{alias()} within hiera documents, but they don't seem to support that. All the best, Mark On Friday, 3 September 2021 at 06:28:03 UTC+1 dhei..

Re: [Puppet Users] hiera merge lookup/alias of array defined at multiple levels

2021-09-02 Thread 'Dirk Heinrichs' via Puppet Users
Am Donnerstag, dem 02.09.2021 um 08:46 -0700 schrieb Mark Dixon: > I'd like to do a simple merge lookup of an array within a hiera yaml > file. At the moment I seem to be getting the array from the hiera > location that "wins", and not a merged version. You need to tell hiera to do so, probably i

[Puppet Users] hiera merge lookup/alias of array defined at multiple levels

2021-09-02 Thread Mark Dixon
Hi there, I'd like to do a simple merge lookup of an array within a hiera yaml file. At the moment I seem to be getting the array from the hiera location that "wins", and not a merged version. I guess it's not possible, perhaps due to possible circular dependencies, etc. Is that right, please

Re: [Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Erwin Bogaard
Indeed it was about looking up a value to use as part of a following lookup, so a lookup in a lookup. I was already afraid this would not be possible. Thanks for the suggestion of using separate yaml files, I'll explore that idea further. On Tuesday, 18 May 2021 at 11:17:00 UTC+2 benri...@gmail.

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] Hiera lookup in hiera lookup

2021-05-18 Thread Martin Alfke
Hi Erwin, Nested lookups are possible. We did a blog post on this topic: https://blog.example42.com/2020/01/21/hiera-nested-lookups/ Just be sure: A nested lookup (like in your example) always returns a string. If you need arrays or

[Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Erwin Bogaard
Hi, I've been looking for this for a ling time, but can't find a definitive answer to my question: is it possible to use a lookup in a lookup? For example: aaa::bbb: "mvn:com.xxx.bus/xxx-features/%{lookup('xxx::apps::env_hash.%{lookup('xxx::apps::env')}.yyy.version')}/xml/features" Should lead

Re: [Puppet Users] Hiera data repetition

2021-02-28 Thread Martin Alfke
Hi Karsten, > On 27. Feb 2021, at 18:18, Karsten Heymann wrote: > > Hi Martin, > > regarding your "no lookup" policy, how do you handle for example deep merge > lookups. They cannot be used with automatic data binding, or am I wrong? > we set the merge behavior using hiera data lookup_option

Re: [Puppet Users] Hiera data repetition

2021-02-27 Thread Henrik Lindberg
On 2021-02-27 18:18, Karsten Heymann wrote: Hi Martin, regarding your "no lookup" policy, how do you handle for example deep merge lookups. They cannot be used with automatic data binding, or am I wrong? Regards Karsten You can specify lookup_options per key in the hiera data itself. One o

Re: [Puppet Users] Hiera data repetition

2021-02-27 Thread Karsten Heymann
Hi Martin, regarding your "no lookup" policy, how do you handle for example deep merge lookups. They cannot be used with automatic data binding, or am I wrong? Regards Karsten Am Sa., 27. Feb. 2021 um 13:06 Uhr schrieb Martin Alfke : > Hi > > > On 25. Feb 2021, at 11:59, Dmitry Nurislamov wrot

Re: [Puppet Users] Hiera data repetition

2021-02-27 Thread Martin Alfke
Hi > On 25. Feb 2021, at 11:59, Dmitry Nurislamov wrote: > > Hello. Sometimes it is desirable to define Hiera variables for usage in Hiera > itself, i.e. variables that won't be looked up from Puppet manifests. We do > this to avoid repetition. Here's an example of a variable used only in the

[Puppet Users] Hiera data repetition

2021-02-26 Thread Dmitry Nurislamov
Hello. Sometimes it is desirable to define Hiera variables for usage in Hiera itself, i.e. variables that won't be looked up from Puppet manifests. We do this to avoid repetition. Here's an example of a variable used only in the file it is defined: _internal_api_host: 'int.api.example.com'

[Puppet Users] hiera v3 to v5 with puppet apply

2020-06-15 Thread Peter Dutton
Hi all, I am using puppet in a 'standalone', or 'masterless' capacity to manage the configurations of different server roles. I'm doing this by using 'puppet apply' with a different environment depending on the situation. For example for local development: puppet apply --modulepath=modules --h

RE: [Puppet Users] hiera with environments

2020-06-12 Thread Bart-Jan Vrielink
11th June 2020 19:45 To: Puppet Users Subject: Re: [Puppet Users] hiera with environments hi, thanks for the reply.  This is all for PE, but i'm using puppet 6 OSS.. It used to work this way in 5.5 too, so I don't understand why its not seeing hiera in the preprod environment.  I could

Re: [Puppet Users] hiera with environments

2020-06-11 Thread solarflow 99
dohh! I can't believe I didn't even notice that darn typo, thats all it was too, its working fine now. Thanks a lot for pointing that out! Hopefully this example might help someone else out at least. I should have seen that... On Thursday, June 11, 2020 at 11:06:22 AM UTC-7, Nick Ber

Re: [Puppet Users] hiera with environments

2020-06-11 Thread Nick Bertrand
Hi, Perhaps it was just a typo in the email, but it looks like there might be a typo in one of your filenames: lrwxrwxrwx 1 root root 29 Jun 8 21:44 hierdata -> > gitclone/production/hieradata/ > Should this have been 'hieradata' instead of 'hierdata'? Nick -- You received this message bec

Re: [Puppet Users] hiera with environments

2020-06-11 Thread solarflow 99
hi, thanks for the reply. This is all for PE, but i'm using puppet 6 OSS.. It used to work this way in 5.5 too, so I don't understand why its not seeing hiera in the preprod environment. I could always do this: - make changed in preprod, and git commit there - cd to prod, then: - git remote up

Re: [Puppet Users] hiera with environments

2020-06-11 Thread Martin Alfke
Hi, You should change to using a control-repo and adopt your codebase. https://puppet.com/docs/pe/2018.1/control_repo.html https://github.com/puppetlabs/best-practices/blob/master/puppet-modules-and-the-control-repo.md

[Puppet Users] hiera with environments

2020-06-08 Thread solarflow 99
I have this strange problem where I just upgraded from puppetserver 5.5 to 6, and now the 2nd environment doesn't see hiera values, but the production environment does. I wonder if top level lookups don't work anymore? Here's how I have it configured: Here's my directory layout: code └── en

Re: [EXTERNAL] - Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-03-03 Thread Dirk Heinrichs
Am Dienstag, den 03.03.2020, 11:14 +0100 schrieb Martin Alfke: sshdconfig::match_address: "xx.xx.xx.xx" Just to clarify: Is "puppet lookup" supposed to find "sshdconfig::match_address" when only "match_address" was given No! That was my thought, too. So the "puppet lookup" command (see first

Re: [EXTERNAL] - Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-03-03 Thread Martin Alfke
Hi, > > Am Mittwoch, den 26.02.2020, 05:57 -0800 schrieb Dan Crisp: > >> sshdconfig::match_address: "xx.xx.xx.xx" > > Just to clarify: Is "puppet lookup" supposed to find > "sshdconfig::match_address" when only "match_address" was given No! Hiera looks for a string based key, not regex. You

Re: [EXTERNAL] - Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-03-03 Thread Dirk Heinrichs
Am Mittwoch, den 26.02.2020, 05:57 -0800 schrieb Dan Crisp: sshdconfig::match_address: "xx.xx.xx.xx" Just to clarify: Is "puppet lookup" supposed to find "sshdconfig::match_address" when only "match_address" was given? Bye... Dirk -- Dirk Heinrichs Senior Systems Engineer, Deliver

Re: [Puppet Users] Hiera Array Only Returns Last Line

2020-03-01 Thread Dan Crisp
Perfect!!! Thank you Martin. On Saturday, February 29, 2020 at 3:49:04 PM UTC, Martin Alfke wrote: > > Sorry. wrong function: > > content => $set.join("\n") > > hth, > martin > > > > On 29. Feb 2020, at 15:56, Dan Crisp > > wrote: > > > > Thanks for the respone Martin. Unfortunately that

Re: [Puppet Users] Hiera Array Only Returns Last Line

2020-02-29 Thread Martin Alfke
Sorry. wrong function: content => $set.join("\n") hth, martin > On 29. Feb 2020, at 15:56, Dan Crisp wrote: > > Thanks for the respone Martin. Unfortunately that made no difference. Still > only end up with one line. > > Thanks, > Dan. > > On Saturday, February 29, 2020 at 2:44:38 PM UTC

Re: [Puppet Users] Hiera Array Only Returns Last Line

2020-02-29 Thread Dan Crisp
Thanks for the respone Martin. Unfortunately that made no difference. Still only end up with one line. Thanks, Dan. On Saturday, February 29, 2020 at 2:44:38 PM UTC, Martin Alfke wrote: > > AFAIK content expects a string. > Maybe you can try > > content => $set.flatten > > hth, > martin >

Re: [Puppet Users] Hiera Array Only Returns Last Line

2020-02-29 Thread Martin Alfke
AFAIK content expects a string. Maybe you can try content => $set.flatten hth, martin > On 29. Feb 2020, at 14:42, Dan Crisp wrote: > > Hi, > > Attempting to popualte a file with a hiera array. > > I have the following hiera defined: > > # more common.yaml > vimrc: > - 'syntax on' >

[Puppet Users] Hiera Array Only Returns Last Line

2020-02-29 Thread Dan Crisp
Hi, Attempting to popualte a file with a hiera array. I have the following hiera defined: # more common.yaml vimrc: - 'syntax on' - 'colo delek' - 'set nu' - 'set cursorline' - 'set history=1000' - 'set showmode' - 'set showcmd' Puppet lookup seems to return what I expect to see

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-29 Thread Dan Crisp
Thanks all. Have this working now. On Wednesday, February 26, 2020 at 4:04:34 PM UTC, Becca Robinson wrote: > > Hi Dan, > > I see that you have this `puppet lookup match_address --node > nodename.domain.com.yaml —explain` . > > Might want to ditch the .yaml from the node name. > > -- > *Becca

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Becca Robinson
Hi Dan, I see that you have this `puppet lookup match_address --node nodename.domain.com.yaml —explain` . Might want to ditch the .yaml from the node name. -- Becca Robinson Senior Professional Services Engineer be...@puppet.com | @_itgrl_ cell: (913) 752-7084 Puppet

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Dan Crisp
ould be automatically looked up in Hiera. > > > > > > -Original message- > *From:* Dan Crisp > > *Sent:* Tuesday 25th February 2020 16:59 > *To:* Puppet Users > > *Subject:* Re: [Puppet Users] Hiera Setup Lookup Complaining > > Hello Bart, &g

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Dan Crisp
Look all good to me: puppet@puppet:/etc/puppetlabs/puppet$ ls -ltr total 40 -rw-r--r--. 1 puppet puppet 5487 Sep 23 22:22 auth.conf -rw-r--r--. 1 puppet puppet 657 Sep 24 12:17 puppet.conf drwxrwx--x. 1 puppet puppet 4096 Sep 27 16:22 ssl drwxr-x---. 2 puppet puppet 4096 Sep 27 22:32 devices -rw

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Henrik Lindberg
On 2020-02-25 16:51, Dan Crisp wrote: This is what I have: --- sshdconfig:   match_address: "xx.xx.xx.xx"   permit_root_login: without-password YAML Lint validates the YAML ok. However, it doesn't matter what I put in this file (Non YAML or a bunch of random characters ) the result is the s

RE: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Bart-Jan Vrielink
be automatically looked up in Hiera.   -Original message- From: Dan Crisp  Sent: Tuesday 25th February 2020 16:59 To: Puppet Users Subject: Re: [Puppet Users] Hiera Setup Lookup Complaining Hello Bart, Thanks for your reply.  Yes that threw me also.  I was originally looking for s

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-25 Thread Dan Crisp
;match_address', but in Hiera it is stored as > 'sshdconfig::match_address'. > > > -Original message- > *From:* Dan Crisp > > *Sent:* Tuesday 25th February 2020 13:42 > *To:* Puppet Users > > *Subject:* Re: [Puppet Users] Hiera

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-25 Thread Dan Crisp
This is what I have: --- sshdconfig: match_address: "xx.xx.xx.xx" permit_root_login: without-password YAML Lint validates the YAML ok. However, it doesn't matter what I put in this file (Non YAML or a bunch of random characters ) the result is the same so I suspect it's not being read. Ho

RE: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-25 Thread Bart-Jan Vrielink
Hello, I see you are looking for 'match_address', but in Hiera it is stored as 'sshdconfig::match_address'. -Original message- From: Dan Crisp  Sent: Tuesday 25th February 2020 13:42 To: Puppet Users Subject: Re: [Puppet Users] Hiera Setup Lookup Complai

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-25 Thread Henrik Lindberg
On 2020-02-25 13:42, Dan Crisp wrote: I included the --compile option.  Now (not sure whether as a result of use --option) I can see/etc/puppetlabs/code/environments/production/data/nodes/nodename.domain.com.yaml in the output: Probably because you got a run done by the agent? Anyway - firs

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-25 Thread Dan Crisp
I included the --compile option. Now (not sure whether as a result of use --option) I can see /etc/puppetlabs/code/environments/production/data/nodes/nodename.domain.com.yaml in the output: Searching for "lookup_options" Global Data Provider (hiera configuration version 5) No such key:

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-24 Thread Henrik Lindberg
Dan Crisp wrote: environment/production/data/nodes/nodename.domain.com.yaml As you can see in the output - the hiera path expanded to: Path "/etc/puppetlabs/code/environments/production/data/nodes/.yaml" Meaning that trusted.certname was empty. It would be empty if the node "nodename.domai

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-24 Thread Dan Crisp
Hello Henrik, thanks for your reply. This file: environment/production/data/nodes/nodename.domain.com.yaml On Monday, February 24, 2020 at 4:26:37 PM UTC, Henrik Lindberg wrote: > > On 2020-02-24 17:06, Dan Crisp wrote: > > Hello all, > > > > Strugling to get started with Hiera (all new to m

Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-24 Thread Henrik Lindberg
On 2020-02-24 17:06, Dan Crisp wrote: Hello all, Strugling to get started with Hiera (all new to me): First glance that looks ok, as you can see it is not finding your key in any of the resulting paths. From where (which data file) was it supposed to find the key you looked up? Best, - hen

[Puppet Users] Hiera Setup Lookup Complaining

2020-02-24 Thread Dan Crisp
Hello all, Strugling to get started with Hiera (all new to me): # more /etc/puppetlabs/puppet/hiera.yaml --- *# Hiera 5 Global configuration file* version: 5 # defaults: # data_hash: yaml_data # hierarchy: # - name: Common #data_hash: yaml_data hierarchy: [] # more environments/producti

[Puppet Users] Hiera value not being passed

2019-10-02 Thread Jagga Soorma
Hello, I am testing out hiera and trying to pass some hiera values to a module so that it can do specific tasks for a given node which does not seem to be working. Here is my setup: -- # puppet lookup --hiera_config=/root/test/puppetlabs/code/environments/production/hiera.yaml nodetype --- mgmt

Re: [Puppet Users] Hiera and precedence

2019-01-18 Thread Henrik Lindberg
On 2019-01-17 18:40, Peter Berghold wrote: I'm having a revertment to my noob days with respect to how hiera works.  (Version 3 for now) If I have the hierarchy of - common - nodes/"%{fqdn}" - datacenter/"%{fdatacenter}" if in common.yaml I have "module::parms::server: server1" and in nodes/

Re: [Puppet Users] Hiera and precedence

2019-01-17 Thread 'Dan White' via Puppet Users
I think you have it bass-ackwards https://puppet.com/docs/puppet/5.0/hiera_hierarchy.html "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Bill Waterson (Calvin & Hobbes) > On Jan 17, 2019, at 12:40 PM, Peter

[Puppet Users] Hiera and precedence

2019-01-17 Thread Peter Berghold
I'm having a revertment to my noob days with respect to how hiera works. (Version 3 for now) If I have the hierarchy of - common - nodes/"%{fqdn}" - datacenter/"%{fdatacenter}" if in common.yaml I have "module::parms::server: server1" and in nodes/myclient.yaml I have "module::parms::server: ser

[Puppet Users] Hiera mod not working

2018-08-02 Thread John
I've got a puppet instance where I'm trying to setup a hiera job to modify a file managed by puppet. The file is /etc/security/access.conf. The file looks like (some details removed): [root@util nodes]# more hostx.yaml X::os::auth::access: '+ : USERACCOUNT : ALL' X::os::auth::access: '

Re: [Puppet Users] Hiera and nested / reuse variables

2018-07-13 Thread Helmut Schneider
Angel L. Mateo wrote: > El 21/06/18 a las 14:32, Helmut Schneider escribió: > > Hi, > > > > common.yaml: > > > > profiles: > >mailserver: > > postfix: > >instances: > > postfix-in: > >instance_path: '/etc/postfix-in' > >other_path:"%{instance

Re: [Puppet Users] Hiera and nested / reuse variables

2018-06-21 Thread Angel L. Mateo
El 21/06/18 a las 14:32, Helmut Schneider escribió: Hi, common.yaml: profiles: mailserver: postfix: instances: postfix-in: instance_path: '/etc/postfix-in' other_path:"%{instance_path}" <= required Is it possible to nest both variables somehow

[Puppet Users] Hiera and nested / reuse variables

2018-06-21 Thread Helmut Schneider
Hi, common.yaml: profiles: mailserver: postfix: instances: postfix-in: instance_path: '/etc/postfix-in' other_path:"%{instance_path}" <= required Is it possible to nest both variables somehow? Or alternatively from common.pp: $instance_path = $profil

Re: [Puppet Users] Hiera: Using multiple facts in one path

2018-06-12 Thread Henrik Lindberg
On 2018-06-13 08:19, Dirk Heinrichs wrote: Hi, is this possible? For example: :hierarchy:   - "kernel/%{::kernel}/%{::kernelmajversion}"   - "kernel/%{::kernel}"   - common yes - henrik Thanks...     Dirk -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge

[Puppet Users] Hiera: Using multiple facts in one path

2018-06-12 Thread Dirk Heinrichs
Hi, is this possible? For example: :hierarchy: - "kernel/%{::kernel}/%{::kernelmajversion}" - "kernel/%{::kernel}" - common Thanks... Dirk Dirk Heinrichs Senior Systems Engineer, Delivery Pipeline OpenText (tm) Discovery | Recommind Email: dhein...@opentext.com

Re: [Puppet Users] hiera lookup

2018-05-31 Thread jcbollinger
On Wednesday, May 30, 2018 at 11:01:40 AM UTC-5, Ugo Bellavance wrote: > > >> >> Of course, where a resource type or class defines default values for its >> parameters and those values meet your requirements, it's fine to rely on >> those. You don't necessarily need to explicitly provide

Re: [Puppet Users] hiera lookup

2018-05-30 Thread Ugo Bellavance
When I leave just the class declaration it works: > > >> class {'postgresql::server::contrib': >> } >> > > > Well if that serves your needs (and it should) then it is better form to > use an include-like declaration instead: > > include 'postgresql::server::contrib' > > But that's mostly a style c

Re: [Puppet Users] hiera lookup

2018-05-30 Thread jcbollinger
On Tuesday, May 29, 2018 at 1:04:10 PM UTC-5, Ugo Bellavance wrote: > > That's awfully surprising if those data appear in an Hiera data file from >> which you are successfully loading other data. If that is in fact >> happening then the most likely reason would be that a resource-like class >

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Ugo Bellavance
> > That's awfully surprising if those data appear in an Hiera data file from > which you are successfully loading other data. If that is in fact > happening then the most likely reason would be that a resource-like class > declaration for that class somewhere in your manifest set is explicitl

Re: [Puppet Users] hiera lookup

2018-05-29 Thread jcbollinger
On Tuesday, May 29, 2018 at 7:25:11 AM UTC-5, Ugo Bellavance wrote: > > > > On Tuesday, May 29, 2018 at 6:55:01 AM UTC-4, Arnau wrote: >> >> >> >> 2018-05-29 12:24 GMT+02:00 Ugo Bellavance : >> >>> >>> >>> On Tuesday, May 29, 2018 at 5:54:54 AM UTC-4, Arnau wrote: Hi, postgres

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Ugo Bellavance
On Tuesday, May 29, 2018 at 6:55:01 AM UTC-4, Arnau wrote: > > > > 2018-05-29 12:24 GMT+02:00 Ugo Bellavance >: > >> >> >> On Tuesday, May 29, 2018 at 5:54:54 AM UTC-4, Arnau wrote: >>> >>> Hi, >>> >>> postgresql::server::contrib::package_name: 'rh-postgresql96-postgresql- >>> contrib' >>> postgr

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Arnau
2018-05-29 12:24 GMT+02:00 Ugo Bellavance : > > > On Tuesday, May 29, 2018 at 5:54:54 AM UTC-4, Arnau wrote: >> >> Hi, >> >> postgresql::server::contrib::package_name: 'rh-postgresql96-postgresql- >> contrib' >> postgresql::server::contrib::packages_ensure: present >> >> > I don't get the error an

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Ugo Bellavance
On Tuesday, May 29, 2018 at 5:54:54 AM UTC-4, Arnau wrote: > > Hi, > > postgresql::server::contrib::package_name: 'rh-postgresql96-postgresql- > contrib' > postgresql::server::contrib::packages_ensure: present > > I don't get the error anymore. It's not doing what it's supposed but I'll look in

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Arnau
Hi, postgresql::server::contrib::package_name: 'rh-postgresql96-postgresql- contrib' postgresql::server::contrib::packages_ensure: present HTH, Arnau 2018-05-29 11:50 GMT+02:00 Ugo Bellavance : > Hi, > > Here's the content of my whole file, thanks: > > --- > > postgresql::globals::client_packag

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Ugo Bellavance
Hi, Here's the content of my whole file, thanks: --- postgresql::globals::client_package_name: 'rh-postgresql96-postgresql' postgresql::globals::createdb_path: '/opt/rh/rh-postgresql96/root/usr/bin/createdb' postgresql::globals::datadir: '/var/opt/rh/rh-postgresql96/lib/pgsql/data' postgresql::

Re: [Puppet Users] hiera lookup

2018-05-29 Thread Arnau
Hi, are you sure the errors is about the contrib? can you show us the hiera content for ' postgresql::server::db' ? Could it be that you have an string when a Hash is expected (for the create_resource). Best, Arnau 2018-05-28 22:19 GMT+02:00 Ugo Bellavance : > Hi, > > I am using the postgresql

[Puppet Users] Hiera and roles/profiles

2018-05-18 Thread Arnau
Hi all, I recently moved from puppet 3 to puppet 5 and hiera 1 to 3. I'm taking this opportunity to change a little bit the hierarchy setup I've been using for the last years. In my previous conf I used to create a custom fact for each role so I could do something like: - "%{environment}/hieradb/

Re: [Puppet Users] Hiera brainstorming

2018-05-10 Thread Craig Dunn
On Sun, May 6, 2018 at 9:26 PM, Robert wrote: > > And the problem: sometimes I'd like to have teams to control only a > specific application, on a server which is already delegated to a team. > E.g. the backup admins should be able to configure the backup software's > agent on Oracle *and* webser

  1   2   3   4   5   6   7   8   >