[Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
Attempting to use hiera to hold all of my node-specific variables. It has been some time since I have run a puppet server, but I know it's not THAT hard. That being said, my modules run fine, but hiera is not looking them up correctly. It appears that any lines that contain any variables in t

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
-5, Rob Nelson wrote: > > It cannot find the files. Do they exist and are they readable to the user > you are running hiera/the puppet master service as? > > On Monday, July 18, 2016, John Baird > > wrote: > >> Attempting to use hiera to hold all of my node-specifi

[Puppet Users] Re: Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
esn't happen. It clearly is not searching where it should be, which is why everything is failing unless it's all hard-coded, which is obviously not ideal. On Tuesday, July 19, 2016 at 2:16:10 AM UTC-5, John Baird wrote: > > Attempting to use hiera to hold all of my node-specif

[Puppet Users] Re: Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
7; tiers are being ignored because > 'calling_class' doesn't expand to anything when running on the command line. > > Try running > hiera -d 'dhcpd::package_name' environment=production calling_class=*x* > replacing x with the corresponding class_name you'd ex

[Puppet Users] Puppet Environment Classification Conflict

2016-08-19 Thread John Baird
I have followed the instructions here: https://docs.puppet.com/pe/2016.2/console_classes_groups.html#creating-environment-node-groups. This states that ALL environments that are created should be a child under "production". This makes sense because I would want it to inherit all of the defa

[Puppet Users] Puppet5 + Hiera not actually including classes during run

2017-08-15 Thread John Baird
root@example1:~# puppet apply --noop -e 'class { apt: }' --modulepath /root/puppet/modules/ --environment=dev --environmentpath=/root/puppet/environments --hiera_config /root/puppet/hiera.yaml Notice: Compiled catalog for example1 in environment dev in 0.13 seconds Notice: /Stage[main]/Apt/File[

[Puppet Users] Re: Puppet5 + Hiera not actually including classes during run

2017-08-15 Thread John Baird
I should also add, running masterless Puppet 5.0.1 on Ubuntu 16.04 if any of that matters. -- 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

[Puppet Users] Re: Puppet5 + Hiera not actually including classes during run

2017-08-15 Thread John Baird
Ok, so we can all move on, nothing to see here! This appears to be an artifact of having previously (unintentionally) installed puppet 3.X. As a result, hiera 2.0.0 was installed. I believe that this version of hiera to be incompatible and as a result, after a clean rebuild, everything is ru

[Puppet Users] Hiera 5 + Puppet 5 File Backend

2017-08-21 Thread John Baird
There was an old hiera 3.X hiera-file backend now owned on github by voxpupuli... does anyone have a working example of how to reproduce this in Puppet 5 with the next data_hash contexts? Puppet's documentation seems woefully lacking in this area. Basically, I would like to be able to serve up

Re: [Puppet Users] Hiera 5 + Puppet 5 File Backend

2017-08-21 Thread John Baird
contents of the file. If you have something that would work, I would love to get it working on my end. On Monday, August 21, 2017 at 3:14:42 PM UTC-5, Henrik Lindberg wrote: > > On 21/08/17 22:03, John Baird wrote: > > There was an old hiera 3.X hiera-file backend now owned on github b

Re: [Puppet Users] Hiera 5 + Puppet 5 File Backend

2017-08-21 Thread John Baird
thin the files. 4. Anything else that may make sense to modify would be good. I appreciate any assistance you can provide. Thanks! On Monday, August 21, 2017 at 3:34:41 PM UTC-5, Henrik Lindberg wrote: > > On 21/08/17 22:18, John Baird wrote: > > I see the "yaml_data" a

Re: [Puppet Users] Hiera 5 + Puppet 5 File Backend

2017-08-21 Thread John Baird
Henrik, I would also like to add that having the ability to serve up binary files, not just ASCII files would also be a great bonus. Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving ema

[Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-22 Thread John Baird
Henrik, Whether the existing YAML/JSON/HOCON backend is referenced, everything is using the context of `path` to do the lookups. The issues with this in regards to a file backend, is I am unsure as to how to access the value or file being looked up. The `path` for the other backends is static

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-22 Thread John Baird
> > Henrik, I have something that appears to be at least "attempting" to find the proper files. The issue I am currently running into is that the "key" or file that I am looking for is being "chopped" at the first ".", which in this case is actually in a folder name, not the file extension.

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-22 Thread John Baird
It looks like you should be able to pass it as a Hash of "options"... https://github.com/saz/puppet-ssh/search?utf8=%E2%9C%93&q=port&type= On Tuesday, August 22, 2017 at 11:36:15 AM UTC-5, John wrote: > > I've pulled down the SAZ SSH module and implemented across my network. It > works great.

[Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-22 Thread John Baird
Henrik, Thanks for the feedback. My concern stems, really, from being able to use this with Puppet. I would think that I should be able to specify a filename and/or filepath that contain a "." without having to escape those myself. The backend should handle that, in my opinion. You can imag

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-22 Thread John Baird
Honestly, I believe you would benefit from reading this over a bit... https://docs.puppet.com/puppet/5.0/lang_template_erb.html On Tuesday, August 22, 2017 at 4:37:35 PM UTC-5, John wrote: > > So I added the following to sshd_config.erb > > <%- if hostname = MyHost -%> > Port = > <%- end -%

[Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-23 Thread John Baird
Henrik, Thanks for the feedback, while I wish there was a "better/native" way, I have accepted that I need to write my own function. I would like to be able to use a similar syntax as "lookup()" and simply specify a filepath and have the contents returned as the content of the file being creat

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-24 Thread John Baird
> > Henrik, I feel like this is becoming overly complicated and perhaps that > is my fault for lack of explanation. I am simply trying to return the contents of a file that is stored in hiera... Perhaps my gist would make more sense ? https://gist.github.com/soudaburger/e253bdce191c731491581

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-24 Thread John Baird
Thank you. I will take that and run with it. I appreciate the comments. On Thursday, August 24, 2017 at 9:27:31 AM UTC-5, Henrik Lindberg wrote: > > On 24/08/17 15:52, John Baird wrote: > > Henrik, I feel like this is becoming overly complicated and perhaps > > th

[Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-27 Thread John Baird
> > The backend function receives a path in the options hash - that path is > guaranteed to exist - all non existing paths are simply skipped by hiera > (see the linked docs how it works). Thus, you do not need to use any of > the find file, etc. You can use relative paths in the hiera.yaml con

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-08-31 Thread John Baird
ith the custom backend. On Monday, August 28, 2017 at 2:03:09 AM UTC-5, Henrik Lindberg wrote: > > On 28/08/17 00:45, John Baird wrote: > > The backend function receives a path in the options hash - that path > is > > guaranteed to exist - all non existing paths are sim

Re: [Puppet Users] Re: hiera consul backend Puppet 4.10

2017-08-31 Thread John Baird
Justin, Funny, i'm dealing with a somewhat similar scenario, but I should let you know that you CAN run lookup from CLI... "puppet lookup" should invoke exactly what "lookup" does from within puppet, that's actually something they did amazingly well... On Thursday, August 31, 2017 at 11:29:02

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-09-02 Thread John Baird
ontext and options, but my manifest knows (or should know) the proper key to look up. How do I combine them so I retrieve the contents of the file? On Sat, Sep 2, 2017 at 3:29 AM Henrik Lindberg wrote: > On 01/09/17 01:32, John Baird wrote: > > Henrik, > > > > I think the disconnec

[Puppet Users] Puppet Lookup Behavior

2017-09-14 Thread John Baird
I am currently implementing the "hiera-http" custom backend written by crayfishx located: "https://github.com/crayfishx/hiera-http";. I have some custom classes that need to run through an iteration of hiera hashes and perform lookups on the values of said hashes. As a result, I would simply l

Re: [Puppet Users] Re: hiera consul backend Puppet 4.10

2017-09-14 Thread John Baird
tried to lookup what services are registered to > a node yet ... can't find a single working example. > > > > > On Thursday, August 31, 2017 at 5:47:09 PM UTC-7, John Baird wrote: >> >> Justin, >> >> Funny, i'm dealing with a somewhat similar scenario, b

[Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-09-15 Thread John Baird
t") which would THEN have to actually exist in that lookup... I would expect Puppet to use module scope when a lookup is performed within the module if scope is not specified for this lookup. https://groups.google.com/forum/#!topic/puppet-users/9q__saaa26w On Monday, August 21, 2017 at 3:0

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-09-15 Thread John Baird
the URI, but that seems insanely hackish... Personally, if I do a lookup from within a module, it should automatically append the current namespace to it for lookup, then this issue goes away. On Friday, September 15, 2017 at 10:54:19 AM UTC-5, Henrik Lindberg wrote: > > On 15/09/17 16:46, J

Re: [Puppet Users] Re: Hiera 5 + Puppet 5 File Backend

2017-09-22 Thread John Baird
building a few custom parsers > in ruby into your backend module to cover common lookup "Styles" that match > your CM layout. By storing them all in the backend module they are > available essentially globally and simply called differently. > > > > On Friday, Sept

[Puppet Users] Puppet Feature Request (lookup with keys containing ".")

2017-10-04 Thread John Baird
Problem: So, currently as has been explained to me, doing a lookup with keys containing "." chops the key at first "." because of scoping and namespace. This makes file-based lookups impossible (as far as I can tell). I would like to be able to use HTTP or other backends to serve files, whi

[Puppet Users] Puppet 5 Stdlib IP address parsing

2018-02-14 Thread John Baird
According to the stdlib docs, "is_ip_address" is deprecated. There is no mention of how to replace it without using "validate_legacy" which itself will ultimately be deprecated. Is there a better/proper approach to validating IPv4 and/or IPv6 syntax with Puppet 5 ? ` is_ip_address *Deprecate

Re: [Puppet Users] Puppet 5 Stdlib IP address parsing

2018-02-15 Thread John Baird
have written over the years, I recognized your name instantly! Thanks for getting back to me! John Baird On Thursday, February 15, 2018 at 12:19:30 AM UTC-6, R.I. Pienaar wrote: > > Use the Stdlib::Compat::Ipv4, ::Ipv6 and ::Ip_address data types > > --- > R.I.Pienaar > >

Re: [Puppet Users] Puppet 5 Stdlib IP address parsing

2018-02-15 Thread John Baird
Ok, that works. I appreciate the response, thanks! On Thursday, February 15, 2018 at 8:01:57 AM UTC-6, R.I. Pienaar wrote: > > > > On Thu, 15 Feb 2018, at 14:50, John Baird wrote: > > R.I, > > > > Can you point me to some docs on exactly how to use those? I

Re: [Puppet Users] Puppet 5 Stdlib IP address parsing

2018-02-15 Thread John Baird
15 Feb 2018, at 14:50, John Baird wrote: > > R.I, > > > > Can you point me to some docs on exactly how to use those? I have > looked > > and I only see references to using them, but not how to actually use > them > > within a manifest for validat