Re: [Puppet Users] Re: puppet lookup in an apply settings

2015-11-21 Thread Henrik Lindberg
On 2015-20-11 13:00, R.I.Pienaar wrote: It works in the basic sense, but does not appear in my case to have access to the node facts (ie. the node its being run on), particularly fqdn etc, so the node specific tier isnt loaded. There are a couple of bugs reported regarding --node and --facts

Re: [Puppet Users] Re: puppet lookup in an apply settings

2015-11-21 Thread Henrik Lindberg
On 2015-21-11 8:22, R.I.Pienaar wrote: - Original Message - From: "Henrik Lindberg" <henrik.lindb...@cloudsmith.com> To: "puppet-users" <puppet-users@googlegroups.com> Sent: Saturday, November 21, 2015 4:08:00 PM Subject: Re: [Puppet Users] Re: pu

Re: [Puppet Users] merge hashes and create_resources

2016-06-06 Thread Henrik Lindberg
On 06/06/16 15:52, Robert Poulson wrote: Dear Henrik, dear Luke, thank you to both of you! I use 4.x but like the second solution too. Went with the first one tho. Since then I realised that I'm actually using hashes of hashes... so hashes more like in a dictionary way. So the following:

Re: [Puppet Users] function that returns parameters from a webservice

2016-06-11 Thread Henrik Lindberg
if there is no value at $config['this']. However... This would be much easier if you were running 4.x as that would fix both your technical issues as well as organizational constraints since it is possible in 4.x to have both global hiera, and hiera data per environment and per module each w

Re: [Puppet Users] Unexpected behavior when using variable interpolation on a subkey in hiera

2016-06-10 Thread Henrik Lindberg
On 10/06/16 20:14, aru...@berkeley.edu wrote: Yikes. When I originally posted I cleaned up identifiable and I took away too much. I actually was passing everything through like I should. Since I deleted my test data from the original post, Here's the hiera data I am having trouble with:

Re: [Puppet Users] function that returns parameters from a webservice

2016-06-10 Thread Henrik Lindberg
On 10/06/16 17:53, Pearl Raj wrote: I am trying to write a module containing a function that returns parameters from a webservice - http://localhost:5000/app/api/nodes/node_id. This function should return a hash of configuration settings specific to that host. How do I do this? I am using puppet

Re: [Puppet Users] merge hashes and create_resources

2016-06-05 Thread Henrik Lindberg
On 05/06/16 19:56, Robert Poulson wrote: Dear List, I've been using Puppet for over a year now and I'm quite enjoying it. I've learned some stuff but there is of course always room for improvement. Now I have a task which needs a nicer solution than I'm currently capable of. I have a hash of

Re: [Puppet Users] How to access $facts['os'] in a manifest

2016-06-02 Thread Henrik Lindberg
On 02/06/16 09:22, Marc Haber wrote: On Wed, Jun 01, 2016 at 05:34:59PM +0200, Henrik Lindberg wrote: First check what you get in puppet with a simple manifest: notice($facts) $ sudo puppet apply -e 'notify{"${os}":}' Notice: Compiled catalog for host in environment producti

Re: [Puppet Users] Ordering of different modules of puppet at same path

2016-06-02 Thread Henrik Lindberg
On 02/06/16 15:35, Shrawan Bhagwat wrote: Hi All, Can anyone suggest me how can i sequence the execution order of different modules of puppet that are present at same path? You can read about that in the documentation: https://docs.puppet.com/puppet/latest/reference/lang_relationships.html

Re: [Puppet Users] How to access $facts['os'] in a manifest

2016-06-02 Thread Henrik Lindberg
On 02/06/16 14:58, Marc Haber wrote: Hi, thanks for your answers. They're helpful. On Thu, Jun 02, 2016 at 02:42:17PM +0200, Henrik Lindberg wrote: On 02/06/16 09:22, Marc Haber wrote: On Wed, Jun 01, 2016 at 05:34:59PM +0200, Henrik Lindberg wrote: First check what you get in puppet

Re: [Puppet Users] How to access $facts['os'] in a manifest

2016-06-02 Thread Henrik Lindberg
On 02/06/16 15:55, Marc Haber wrote: On Thu, Jun 02, 2016 at 03:41:35PM +0200, Henrik Lindberg wrote: On 02/06/16 14:58, Marc Haber wrote: On Thu, Jun 02, 2016 at 02:42:17PM +0200, Henrik Lindberg wrote: On 02/06/16 09:22, Marc Haber wrote: On Wed, Jun 01, 2016 at 05:34:59PM +0200, Henrik

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Henrik Lindberg
On 02/06/16 03:42, Rob Nelson wrote: Geppetto is definitely heavy. It also looks like development stopped, last release was over a year ago. It's probably not worth starting to use it now if it's a dead product. Geppetto is no longer maintained. If you want an IDE, look at Netbeans, or

Re: [Puppet Users] How to access $facts['os'] in a manifest

2016-06-01 Thread Henrik Lindberg
On 01/06/16 16:43, Marc Haber wrote: Hi, I have the following code: if( $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7' ) { file { "...": ensure => 'file', path=> "...", content => "...", }

Re: [Puppet Users] 3.8.5 Master with 3.7.2 Agents

2016-05-30 Thread Henrik Lindberg
On 27/05/16 12:59, Rob Nelson wrote: IME you definitely won't have issues with 3.7.2 agents talking to a 3.8.5 master. When you are ready to move to puppet 4, however, the upgrade docs say that the agents should all hit 3.8 before you upgrade the master to 4.latest. However, I skipped that step

Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Henrik Lindberg
On 30/05/16 19:09, dkoleary wrote: Hey; According to the puppet language resource guide at https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html: If a resource expression includes more than one resource body, the expression will declare multiple resources of that

Re: [Puppet Users] Multiple resource bodies?

2016-05-30 Thread Henrik Lindberg
On 30/05/16 19:45, Rob Nelson wrote: I would be willing to bet '/' is somewhat special and may be the problem. I've never actually tried to manage the root of the FS directly and I think the need to may indicate some more significant issues than puppet should be handling. Yes, known problem.

Re: [Puppet Users] Re: Hiera lookup fail : doesan't find json file

2016-06-23 Thread Henrik Lindberg
On 23/06/16 07:45, chris wrote: On Thursday, 23 June 2016 11:06:54 UTC+10, chris wrote: So as you can see from above, it prefixes each keyname with the dir and appends '.json', as it should BUT only if keyname/data src has a numeric digit in it! Is this a bug in puppet?? Or am I missing

Re: [Puppet Users] How to cope with accented characters in DisplayName using Puppet 3.8.x on Windows XP?

2016-01-08 Thread Henrik Lindberg
On 2016-08-01 14:23, Tiago Delboni wrote: Hi! On Windows 7 we have Puppet 4.2.x and, in order to deal with accented characters commonly found in registry key DisplayName, we use unicode escape sequences in our manifests such as "\u00FA". However, on Windows XP, we couldn't install Puppet

Re: [Puppet Users] Using Future Parser on Puppet v3.8.2

2016-02-01 Thread Henrik Lindberg
On 2016-01-02 23:00, Sans wrote: Thanks Henrik, for giving me the clue. It was really silly: My PM is self-managed, i.e. the puppet-agent also runs on the PM, which maintains the puppet.conf and it was overriding the parser=future, every time I was restating Apache after adding that bit

Re: [Puppet Users] Using Future Parser on Puppet v3.8.2

2016-01-31 Thread Henrik Lindberg
On 2016-29-01 21:44, Sans wrote: Hi there, Need to iterate over an arry, so was trying the Future Parser. Using a very simple example: | $alpha =['a','b','c'] each($alpha)|String$value|{notice("Hi there, ${value}")} | but getting this error: *Error: Could not retrieve catalog from

Re: [Puppet Users] Puppet Strings 'Stack Level Too Deep'

2016-02-23 Thread Henrik Lindberg
remote add doctest https://github.com/trevor-vaughan/simp-doc git fetch --all git checkout autodoc bundle rake docs:auto Thanks, Trevor Please file a PDOC Jira ticket if you have not already (with the information how to reproduce). - henrik On Tue, Feb 23, 2016 at 3:41 PM, Henrik Lindberg

Re: [Puppet Users] Puppet Strings 'Stack Level Too Deep'

2016-02-23 Thread Henrik Lindberg
On 23/02/16 19:24, Trevor Vaughan wrote: Hi All, I'm attempting (once again) to document all of my materials with Puppet Strings as a collected reference for *all* of my utilized modules. Right now, this is somewhere around 1058 Puppet and Ruby artifacts. Unfortunately, at some point, the

Re: [Puppet Users] Catalog compilation weirdness

2016-02-28 Thread Henrik Lindberg
On 29/02/16 01:18, Robert Davidson wrote: I think I figured it out. For whatever reason, delete_undef_values wasn't doing what it said on the tin - I'm not sure why, > or if I should even report this as a bug to the puppet-keystone devs. That looks like a valid bit of puppetry to me, and I

Re: [Puppet Users] problem with function lookup provider.

2016-02-24 Thread Henrik Lindberg
On 24/02/16 21:57, RG wrote: I am using puppet 4.3 and it looks like the new function lookup provider is not working, unless i am missing something. I am working from this: https://docs.puppetlabs.com/puppet/latest/reference/lookup_quick_module.html I am just testing with this simple example.

Re: [Puppet Users] 'export' is a reserved word?

2016-02-25 Thread Henrik Lindberg
On 25/02/16 22:56, Tim Skirvin wrote: Summary: using the word 'export' as a definition in a parameter seems to have stopped working somewhere between puppet-agent 1.2.2 and puppet-agent 1.3.5. Is this intentional/documented somewhere, or is it a bug? Has anybody else seen this?

Re: [Puppet Users] Testing Puppet dsl functions

2016-02-15 Thread Henrik Lindberg
On 2016-15-02 12:12, Alessandro Franceschi wrote: Hi all, I've started with some excitement to play with functions written in Puppet DSL, very simple things for the moment that do their work as expected: https://github.com/example42/puppet-tp/commit/d6973233bea27661fc91b475de16f3d0bbc9690c

Re: [Puppet Users] Syntax problem, if/case in class section for $hostname

2016-02-15 Thread Henrik Lindberg
On 2016-15-02 8:37, Denny Schierz wrote: hi, I try to get an if/case thing working, but I always get a syntax error. We have something like that for an user: modules/users/manifests/fbar.pp class users::fbar ( $ensure = present, $groups = [ 'develop' ] ) { case

Re: [Puppet Users] Difference between Puppet agent v. apply

2016-02-17 Thread Henrik Lindberg
On 18/02/16 02:10, warron.french wrote: Can someone please clearly explain why/when to use: puppet apply versus Puppet agent? puppet agent makes requests to the master - the master compiles the catalog. puppet apply produces the catalog locally (must have all the manifests etc on the agent)

Re: [Puppet Users] SERVER: Could not match |$mount|

2016-02-19 Thread Henrik Lindberg
On 19/02/16 12:33, Michael Wörz wrote: Hello, given the following dict storage: layout: ORA nfs: mounts: /home: sharedfiler:/vol_MWO_shared/misc/os/home /oracle: sharedfiler:/vol/mwo_shared_cdot/misc/db/oracle/oracle i want to iterate over mounts class sysctl::encmounts(){

Re: [Puppet Users] How to get a value of fact that has dot in name?

2016-03-18 Thread Henrik Lindberg
On 18/03/16 23:23, Jakov Sosic wrote: On 03/18/2016 06:52 AM, Francois Lafont wrote: In fact, it's currently impossible in hiera: https://tickets.puppetlabs.com/browse/PUP-5990 According to the ticket, it should be solved in the next Puppet version, ie Puppet 4.4.1. Oh wow, it is

Re: [Puppet Users] Re: Hiera repository + environments + r10k

2016-03-08 Thread Henrik Lindberg
On 08/03/16 15:15, Rudy Gevaert wrote: Just wondering what others have done and what approaches they have taken to solve this issue? Maybe there is some feature of git I am not aware of where I can systematically pick what to merge and what not (although if that was possible I

Re: [Puppet Users] how to check existences of a file in a ERB template?

2016-03-29 Thread Henrik Lindberg
On 29/03/16 12:40, Sans wrote: Hi Trevor, I don't think "Templates" are technically executed on the Master - that's for the client/agents. The asset(s) we define in the template has to native to the agent. You can say everything gets complied on the master. Correct me, if I'm wrong. ERB (as

Re: [Puppet Users] Re: using generated query string in a collector

2016-04-12 Thread Henrik Lindberg
On 12/04/16 15:05, jcbollinger wrote: Peeking to puppetdbquery as an alternative I'm not quite seeing how puppetdbquery would help, but Felix's suggestion to build a solution in the old-school way, based on array-titled resource declarations, should work in any version of Puppet from

Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Henrik Lindberg
On 23/03/16 21:04, Hunter Haugen wrote: Given the resource you want to apply this pattern to, it can be turned into a one-liner with a collector: file { '/tmp/something': ensure => file, } File['/tmp/something'] ~> Service <| title == 'apache2' |> This means that if there is a service with

Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Henrik Lindberg
On 23/03/16 21:56, Matt Zagrabelny wrote: On Wed, Mar 23, 2016 at 3:04 PM, Hunter Haugen wrote: Given the resource you want to apply this pattern to, it can be turned into a one-liner with a collector: file { '/tmp/something': ensure => file, } File['/tmp/something']

Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Henrik Lindberg
On 23/03/16 12:37, Martin Alfke wrote: On 23 Mar 2016, at 12:23, Henrik Lindberg <henrik.lindb...@puppetlabs.com> wrote: On 23/03/16 11:24, Martin Alfke wrote: On 22 Mar 2016, at 22:53, Carthik Sharma <cart...@puppetlabs.com> wrote: To answer the question in the subject, yo

Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Henrik Lindberg
On 23/03/16 11:24, Martin Alfke wrote: On 22 Mar 2016, at 22:53, Carthik Sharma wrote: To answer the question in the subject, you're correct, as documented here for Puppet 3.8 https://docs.puppetlabs.com/puppet/3.8/reference/environments_classic.html#allowed-names

Re: [Puppet Users] problem with hiera arrays ?

2016-03-21 Thread Henrik Lindberg
On 17/03/16 23:39, EmAr wrote: Since updating to the latest version of puppetserver, puppet agent and puppet db, I have a problem with hiera data arrays. I have a webserver profile with this code : […] apache::vhost { "${vhost_config[hostname]}:${vhost_config[port]}" : […]

Re: [Puppet Users] validate_bool() throwing in error syaing the value not a boolean

2016-03-03 Thread Henrik Lindberg
On 03/03/16 17:46, Trevor Vaughan wrote: You can try using the hiera command line tool on your hiera.yaml file. hiera -c '/path/to/hiera.yaml' your::variable. If you are on a newer puppet version where the lookup command is available you can use 'puppet lookup --explain your::variable' as

Re: [Puppet Users] Module parameter handling

2016-03-03 Thread Henrik Lindberg
On 02/03/16 11:26, Thomas Bendler wrote: Hi @all, I write a module that create local users on my boxes. Now I try to make that module fully dynamic so that the user informations are passed to the module as parameter like this: class { 'local_users': user => [ { 'john' => { name =>

Re: [Puppet Users] validate_bool() throwing in error syaing the value not a boolean

2016-03-05 Thread Henrik Lindberg
up so that puppet apply works on the agent, then lookup will also work there. - henrik On Friday, March 4, 2016 at 4:52:05 PM UTC, Henrik Lindberg wrote: Recent would be >= 4.2 wrt. lookup functionality. Sorry. - henrik -- You received this message because you are subscri

Re: [Puppet Users] validate_bool() throwing in error syaing the value not a boolean

2016-03-04 Thread Henrik Lindberg
On 04/03/16 16:41, Sans wrote: I'm on v3.8.4 Can it be run from agent? If it does, then it gonna solve my another issue as well. Recent would be >= 4.2 wrt. lookup functionality. Sorry. - henrik -San On Thursday, March 3, 2016 at 6:10:33 PM UTC, Henrik Lindberg wrote: If

Re: [Puppet Users] Defined resource type, lambda block

2016-03-30 Thread Henrik Lindberg
On 30/03/16 12:51, 'Manuela Mueller' via Puppet Users wrote: deftype_users_test::create { $user['name']: $user here is probably an array and it expects the "key" to be numeric Regards - henrik -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blogspot.se/ -- You received

Re: [Puppet Users] referencing boolean within puppet manifest

2016-04-14 Thread Henrik Lindberg
On 13/04/16 03:31, Garrett Honeycutt wrote: On 4/12/16 2:53 PM, Mike Reed wrote: Hello all, I've recently experienced some inconsistencies around referencing Boolean values within a puppet manifest. We've written some custom Boolean facts and we look to the true/false values within our

Re: [Puppet Users] Re: Puppet Hiera Hash SubKey Interpolation

2016-04-27 Thread Henrik Lindberg
On 27/04/16 15:05, Aaron Russell wrote: I am not sure if you can lookup a subkey like that in hiera. (i could be wrong) In later versions of puppet/hiera, it is possible to use dot (.) notation to lookup a value within the data that is produced by they key. It is possible to use both

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Henrik Lindberg
d a lot. Also I got the impression that git was more closely integrated with puppet. Should I be l looking at git ? A On 23 May 2016 at 10:40, Henrik Lindberg <henrik.lindb...@puppet.com> wrote: On 22/05/16 12:41, Alex Samad wrote: Hi just starting out with puppet. I found this http://p

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Henrik Lindberg
On 24/05/16 01:03, Ramin K wrote: On 5/22/16 3:41 AM, Alex Samad wrote: Hi just starting out with puppet. I found this http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control old page talks about checking /etc/puppet into svn. But on my centos install I have

Re: [Puppet Users] History of possible usage of EPP URIs in the form of "'puppet:////.epp"?

2016-05-22 Thread Henrik Lindberg
On 23/05/16 03:07, David Karr wrote: On Sunday, May 22, 2016 at 5:37:22 PM UTC-7, Henrik Lindberg wrote: On 23/05/16 02:26, David Karr wrote: > In "Learning Puppet 4", there are a couple of variations of calls to the > "epp" function. Some of them

Re: [Puppet Users] Hiera 2.0 with Puppet 3.x

2016-05-22 Thread Henrik Lindberg
On 19/05/16 22:19, Scott Briggs wrote: Does anyone have any experience with Hiera 2.0 with Puppet 3.x? Is that even possible given the newer "all in one" architecture? "All in One" did not start until 4.x. In general - even if you managed to make some odd combination puppet/hiera work,

Re: [Puppet Users] Cannot alias definition, duplicate declaration

2016-05-22 Thread Henrik Lindberg
On 19/05/16 17:22, Julie Iaccarino wrote: Hey all! I've got a bit of an oddity. I've upgraded from 3.7 to 4.4 and gone over the upgrade checklist for my code, but I'm still getting some catalog errors. 2016-05-19 15:06:51 + Puppet (err): Could not retrieve catalog from remote

Re: [Puppet Users] History of possible usage of EPP URIs in the form of "'puppet:////.epp"?

2016-05-22 Thread Henrik Lindberg
On 23/05/16 02:26, David Karr wrote: In "Learning Puppet 4", there are a couple of variations of calls to the "epp" function. Some of them use the syntax that I find in the actual Puppet docs, which is just "/.epp", but some of them use something that looks more like a URI, like

Re: [Puppet Users] Logrotate module broken, string 'undef' now treated as undef

2016-05-22 Thread Henrik Lindberg
On 18/05/16 23:33, Daniel Urist wrote: I have been using the yo61 logrotate module from puppetforge (https://forge.puppet.com/yo61/logrotate), which seems to be the most popular, but it recently stopped working, with many errors about undefined parameters. The issue seems to be the use of the

Re: [Puppet Users] Puppet and SVN

2016-05-22 Thread Henrik Lindberg
On 22/05/16 12:41, Alex Samad wrote: Hi just starting out with puppet. I found this http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control old page talks about checking /etc/puppet into svn. But on my centos install I have /etc/puppetlabs/puppet do I add /etc/puppetlabs or

Re: [Puppet Users] Can data type validation reference a variable for the possible enum values?

2016-05-22 Thread Henrik Lindberg
On 20/05/16 20:23, David Karr wrote: Reading through "Learning Puppet 4", I noticed the ability to define parameter types with pretty specific constraints, like "Enum['foo','bar']", et cetera. Is there any way for the list of possible enum values to be specified elsewhere and then referenced in

Re: [Puppet Users] Puppet and SVN

2016-05-22 Thread Henrik Lindberg
certain things more easily. Parts of puppet enterprise are more closely integrated with git. - henrik A On 23 May 2016 at 10:40, Henrik Lindberg <henrik.lindb...@puppet.com> wrote: On 22/05/16 12:41, Alex Samad wrote: Hi just starting out with puppet. I found thi

Re: [Puppet Users] Diagnose error with simple tutorial in "Learning Puppet 4"?

2016-05-17 Thread Henrik Lindberg
On 17/05/16 21:38, David Karr wrote: I'm stepping through "Learning Puppet 4". I'm on the chapter that builds a simple custom module. I've followed the instructions as far as I can tell, but when I try to apply the module, I get the following: | [vagrant@client modules]$ puppet apply

Re: [Puppet Users] Puppet Module directory structure

2016-05-16 Thread Henrik Lindberg
On 16/05/16 15:31, Harish Kothuri wrote: Hi, Can we customize the puppet module directory structure as i would like to separate the puppet modules and in-house written modules. Yes. The modulepath takes multiple entries - each should be the path to a directory containing modules. You should

Re: [Puppet Users] Issues with Data in Modules and nested classes and scope...

2016-05-16 Thread Henrik Lindberg
On 16/05/16 13:00, Gavin Williams wrote: Morning all... I've hit a bit of an issue with our usage of Data-In-Modules (DIM) provided by ripienaar/module_data with Puppet 3.7.x and was wondering what the best option might be... TL;DR: How can I change the DIM Hiera lookup scope to use the

Re: [Puppet Users] suppressing undefined variable warnings in PE2016.1

2016-05-06 Thread Henrik Lindberg
On 06/05/16 21:00, Vince Skahan wrote: Is there a way to shut up the undefined variable warnings in PE2016.1 ? This is https://tickets.puppetlabs.com/browse/PUP-1780 Which was released in Puppet 4.4.0, and is thus in all PE2016.1 versions. The input to docs (in the ticket) says: "All

Re: [Puppet Users] Upgrading Puppet from 2.7 to 4

2016-05-06 Thread Henrik Lindberg
On 06/05/16 15:46, christg76 wrote: Hi, I'm fairly new to Puppet and have been given the project of upgrading an existing Puppet 2.7 site (Puppetmaster with Apache/Passenger, and MySQL for exported resources, with hundreds of clients), possibly to Puppet 4. Just wanted to ask around if anybody

Re: [Puppet Users] Using the Puppet Catalog Preview tool in a rspec-puppet workflow?

2016-07-27 Thread Henrik Lindberg
On 26/07/16 20:46, robbyt wrote: I'd like to use the Catalog Preview tool as part of module spec tests, to ensure that code in each module will work correctly in both versions of Puppet? Is it possible to use the Catalog Preview tool without a real Puppet Master infrastructure? Yes, except for

Re: [Puppet Users] hiera_hash lookup returns struct, how to pass to function written in puppet?

2016-08-13 Thread Henrik Lindberg
On 11/08/16 17:07, pokemon.master.metal...@gmail.com wrote: Hi Henrik, thanks again for your help. I tried it and go the same result as you on puppet 4.3.2 Then it must be something wrong with the data from data binding since clearly, if you give it valid data it works. - henrik -- You

Re: [Puppet Users] Re: hiera_hash lookup returns struct, how to pass to function written in puppet?

2016-08-13 Thread Henrik Lindberg
On 11/08/16 17:36, pokemon.master.metal...@gmail.com wrote: I ended up coming up with a way to reproduce it without hieradata: init.pp | classfoo(Hash[String,Struct[{ x =>Array[Integer], y =>Array[String]}]]$arg ) { notify{"$arg":} } classtest { class { 'foo': arg =>{propertya

Re: [Puppet Users] hiera_hash lookup returns struct, how to pass to function written in puppet?

2016-08-11 Thread Henrik Lindberg
On 11/08/16 06:13, pokemon.master.metal...@gmail.com wrote: Thanks Henrik, I created a sample, here's what you need to reproduce the error (which is mentioned at the bottom) function | functiontest::myfunc(Struct[{ propertya =>Hash[String,Struct[{propertya_1 =>Array[Integer],propertya_2

Re: [Puppet Users] hiera_hash lookup returns struct, how to pass to function written in puppet?

2016-08-10 Thread Henrik Lindberg
On 10/08/16 18:28, pokemon.master.metal...@gmail.com wrote: I'm relatively new to puppet but I used hiera_hash to lookup what I would consider a "hash" in yaml. The data I tested with is rather complex in nature but it basically boils down to a hash of hashes with sub hashes / arrays. Ex: (my

Re: [Puppet Users] Convert hiera_hash code to hiera_array?

2016-06-28 Thread Henrik Lindberg
On 28/06/16 18:34, potlipin wrote: Hi all, I'm trying to install a cron module in our Puppet 2.6 infrastructure, to be used with Hiera. Puppet 2.6 is really old. It is not even the latest of the 2.x series which was end of life quite some time ago (October 1, 2013). Now, soon 3.x is end of

Re: [Puppet Users] Hiera question

2016-07-01 Thread Henrik Lindberg
On 01/07/16 06:20, Alex Samad wrote: Hi I have in my common.yaml --- classes: - ssh How do I say if the OS is linux then add that class ? I think it is best if you try to read the documentation and look at tutorials. This very first step is clearly shown there. - henrik Thanks

Re: [Puppet Users] Local variables lost outside of .each loop

2017-02-01 Thread Henrik Lindberg
On 30/01/17 22:34, Martin Alfke wrote: AFAIK all variables inside a lambda are “private”: https://docs.puppet.com/puppet/latest/lang_lambdas.html#lambda-scope Correct - they are local and only visible to inner scopes in the lambda (a lambda in a lambda). If you need an iterative function

Re: [Puppet Users] Escape codes in collection types

2017-02-01 Thread Henrik Lindberg
On 01/02/17 00:20, Joshua Schaeffer wrote: I'm new to Puppet and learning the program and language so this question might seem novice. I'm confused why I can assign an escape character to a variable but not inside any collection types (arrays or hashes). I was doing the simply motd puppet module

[Puppet Users] having hiera issues after upgrade to Puppet 4.9.0 ?

2017-02-02 Thread Henrik Lindberg
Puppet 4.9.0 just went live and we are waiting for the proper release notes to be sent out. Early users have started to upgrade and have been running into a couple of issues that are easily fixable. The new implementation is sensitive to errors in hiera.yaml

Re: [Puppet Users] drop-down list for class parameter values

2017-02-02 Thread Henrik Lindberg
On 02/02/17 00:46, James Boone wrote: Is there a way to define a list of allowed values for a class parameter so that it shows up as a drop-down menu in pe-console? If not, would this be a feasible feature to add? Have a common case where a parameter is a few set possible values, would like to

Re: [Puppet Users] puppet 4.9.0 is not compatible with hiera-eyaml

2017-02-05 Thread Henrik Lindberg
On 05/02/17 20:25, Vadym Chepkov wrote: Hi, It looks like puppet 4.9.0 (installed with puppet-agent-1.9.0) is not compatible with hiera-eyaml # puppet lookup testkey Error: Could not run: Hiera type mismatch: expected Hash and got String I downgraded to puppet-agent-1.8.3 meanwhile and it

Re: [Puppet Users] puppet stop working

2017-02-03 Thread Henrik Lindberg
On 03/02/17 13:59, Albert Shih wrote: Le 02/02/2017 à 18:09:58+0100, Henrik Lindberg a écrit On 02/02/17 14:28, Albert Shih wrote: Hi, We just update puppet-agent (Debian, puppetlabs repot) on the puppetserver (last version), and every agent stop working with this error Info: Using

Re: [Puppet Users] puppet stop working

2017-02-02 Thread Henrik Lindberg
On 02/02/17 14:28, Albert Shih wrote: Hi, We just update puppet-agent (Debian, puppetlabs repot) on the puppetserver (last version), and every agent stop working with this error Info: Using configured environment 'jas' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts

Re: [Puppet Users] My Array and Hash datatype getting treated as simple string.

2017-01-23 Thread Henrik Lindberg
On 22/01/17 07:59, Arun Kumar wrote: Hi Guys, I am very new to Puppet and installed 3.8. I tried creating template using array type variable but I got output as string. My sample code as below: init.pp --- $servers = ['facter', 'hiera', 'mco', 'puppet', 'puppetserver'], config.pp

Re: [Puppet Users] how to use external facts in a template?

2017-01-26 Thread Henrik Lindberg
e of fact x for node y". - henrik On Wednesday, January 25, 2017 at 11:23:06 PM UTC, Henrik Lindberg wrote: Do not ever reference Facter directly on the master side from functions or ERB templates used when compiling. Only reference Facter in logic that implements fact

Re: [Puppet Users] Re: Puppet Actions in Parallel?

2017-01-30 Thread Henrik Lindberg
On 30/01/17 12:58, Michael Shaw wrote: The very clear use case for me is in the puppet management of infrastructure. Take the case of puppet being used to automate the creation of a database server. The Command to initiate the creation takes around 2 seconds to complete. The process to

Re: [Puppet Users] how to use external facts in a template?

2017-01-25 Thread Henrik Lindberg
On 25/01/17 20:20, Sans wrote: On Wednesday, January 25, 2017 at 7:05:03 PM UTC, R.I. Pienaar wrote: only if you enable structured facts and have a new facter Well, it's not "structured" i.e. it returns only a string. and didn't work as expected. It also an "external fact", not sure

Re: [Puppet Users] Re: hiera deep hash merges broken

2017-02-17 Thread Henrik Lindberg
On 16/02/17 15:37, Francois Lafont wrote: Hi, On 02/16/2017 09:03 PM, Henrik Lindberg wrote: We are adding support for eyaml in hiera 5 which means you will get explain support and that you can use eyaml when also using the new format. We now also test with eyaml. By the way, and just

Re: [Puppet Users] Hiera 5 calling_class

2017-02-10 Thread Henrik Lindberg
On 08/02/17 17:55, Ben Hines wrote: Perhaps this is just a bug, but does %{calling_class} function with Hiera 5? I haven't been able to get it to function. Perhaps it has a new syntax? It is deliberately not supported in the hiera 5 format. - henrik Notice it's blank: ==> test:

Re: [Puppet Users] hiera_hash, lookup, Hiera 5

2017-02-10 Thread Henrik Lindberg
On 10/02/17 13:32, Daniel Urist wrote: I have been using ":merge_behavior: deeper" in my hiera.yaml file to turn on deep hash merges with hiera_hash, but now this appears to be broken. Puppet 4.9.0/4.9.1 went out with a number of issues related to hiera. All reported problems (including

Re: [Puppet Users] Hiera 5 calling_class

2017-02-10 Thread Henrik Lindberg
sure this gets to the docs folks. Anyway in my case i can work around with module data. Excellent! - henrik thanks! -Ben On Fri, Feb 10, 2017 at 1:39 PM, Henrik Lindberg <henrik.lindb...@puppet.com <mailto:henrik.lindb...@puppet.com>> wrote: On 08/02/17 17:55, Ben

Re: [Puppet Users] Re: hiera deep hash merges broken

2017-02-16 Thread Henrik Lindberg
On 16/02/17 08:16, Daniel Urist wrote: It turns out my issue was caused by eyaml no longer supporting deep hash merges. I've worked around my issue by separating out plain yaml and eyaml. Fortunately none of my existing code does a deep hash merge on the eyaml keys. It would be great to get

Re: [Puppet Users] Puppet erb template create loop

2017-02-16 Thread Henrik Lindberg
On 13/02/17 18:05, Rafael Tomelin wrote: Hi dear, I is create a module and need loop in puppet class and template The my class step is: 1) My class have array declared; $pools = [ { name => 'PoolDiario', poolType => 'Backup', recycle=>

Re: [Puppet Users] Conflict between new docs and puppet

2017-03-01 Thread Henrik Lindberg
On 28/02/17 20:22, Joshua Schaeffer wrote: The docs on lookup() . state that in order to upgrade to to hiera v5 you should follow the below list: * Change any |hiera|/|hiera_array|/|hiera_hash| calls in your manifests to use

Re: [Puppet Users] puppet4 stdlib (4.12.0) error with .find method?

2016-09-07 Thread Henrik Lindberg
On 07/09/16 20:58, Matthew Pounsett wrote: Having just installed zleslie/pkgng in order to ma nage repositories on my FreeBSD hosts (which in turn required and installed puppetlabs/stdlib), I'm now getting the following error from my puppet runs: % sudo puppet agent -t Info: Using configured

Re: [Puppet Users] Passing parameters to manifest from puppet agent

2016-09-09 Thread Henrik Lindberg
On 09/09/16 07:08, rakshatha.shetty via Puppet Users wrote: Hi, Im using puppet agent 4.5.3. I'm trying to send values to variables defined in manifest present in my puppet master through puppet agent. Is there any way to accomplish it? Have you looked at facts? They are the main mechanism

Re: [Puppet Users] Re: notify resource different between 3 and 4?

2016-09-23 Thread Henrik Lindberg
On 20/09/16 15:54, R.I.Pienaar wrote: - Original Message - From: "jcbollinger" To: "puppet-users" Sent: Tuesday, 20 September, 2016 15:37:21 Subject: Re: [Puppet Users] Re: notify resource different between 3 and 4? On

Re: [Puppet Users] How to use class in different place

2016-08-25 Thread Henrik Lindberg
On 25/08/16 22:40, Albert Shih wrote: Hi, I would like to known how can I use a class in different place. Let's take a example. I have a module who manage a CMS, let's say something like drupal (or whatever you want). So in this CMS I need to use apache class. So I get in my node.yaml

Re: [Puppet Users] duplicate resource with inherit and puppet apply

2016-09-28 Thread Henrik Lindberg
On 28/09/16 14:30, Toni Schmidbauer wrote: hi, it's a stupid example but nevertheless it would be interesting to now why the following throws a duplicate resource error under puppet 3.7.4 and puppet 4.2.1 test/manifests/init.pp: # start puppet code class test inherits test::subclass {

Re: [Puppet Users] Setting resource dependency from hiera problem

2016-09-28 Thread Henrik Lindberg
On 23/09/16 14:16, Matt Raso-Barnett wrote: require: "Network::If::Static['eth1']" Should be require: "Network::If::Static[eth1]" Since the string form of resource references does not include quotes around the title - thus it is searching for a resource named "'eth1'" instead of one

Re: [Puppet Users] duplicate resource with inherit and puppet apply

2016-10-03 Thread Henrik Lindberg
On 03/10/16 15:48, jcbollinger wrote: On Friday, September 30, 2016 at 2:03:06 PM UTC-5, Toni Schmidbauer wrote: Henrik Lindberg <henrik@puppet.com > writes: > On 28/09/16 14:30, Toni Schmidbauer wrote: > I tried this on latest puppet: > > === test.p

Re: [Puppet Users] How to comment multiple lines on configurations file

2016-11-23 Thread Henrik Lindberg
On 21/11/16 11:35, Amber Mehra wrote: Hey Guys, I need to comment multiple lines on some configuration files, Please let me know how to accomplish this task using puppet manifest? Best Comments in puppet are either # This is a line comment or /* this is a multiline comment */ The

Re: [Puppet Users] Execute puppet manifest based on the OS family

2016-11-28 Thread Henrik Lindberg
On 28/11/16 10:06, Amrit Atmajit wrote: Hi, I am using puppet 4.7.0 in my Puppet Server where different OS families are used as nodes. I have created Puppet Manifests (Puppet Classes) where couple of them to be executed on windows Puppet agent nodes and others on Linux nodes. So, to do the

Re: [Puppet Users] puppet 3 to 2016.4

2016-10-13 Thread Henrik Lindberg
On 13/10/16 22:25, kevin wrote: how do they do that. Who is they? Do what? What scripting language will thy be using for the. For the what? Puppet is mostly written in Ruby. Modules and your manifests are written in the Puppet Language. Upgrading from puppet 3.x to 4.x means that you not

Re: [Puppet Users] Issue with module from forge - Duplicate declaration Class[Rsyslog]

2016-10-12 Thread Henrik Lindberg
On 12/10/16 14:59, jcbollinger wrote: On Tuesday, October 11, 2016 at 3:54:25 PM UTC-5, re-g...@wiu.edu wrote: On Monday, October 10, 2016 at 9:07:35 AM UTC-5, jcbollinger wrote: On Friday, October 7, 2016 at 10:39:58 AM UTC-5, re-g...@wiu.edu wrote:

Re: [Puppet Users] Puppet counter part for ruby caller function/object

2016-12-13 Thread Henrik Lindberg
On 12/12/16 11:11, Michel Verbraak wrote: I have been googling around to find an answer but was not able to find it. I have created my own custom type in puppet. According to the documentation here Puppet Resource Types manual

Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-13 Thread Henrik Lindberg
On 13/01/17 12:16, Tiago Delboni wrote: Em quarta-feira, 11 de janeiro de 2017 15:38:28 UTC-2, Henrik Lindberg escreveu: Maybe there is something wrong with that type. What does this give you: notice('C:\a\valid\path' =~ Stdlib::Windowspath) If that fails, please report

Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-11 Thread Henrik Lindberg
ng with that type. What does this give you: notice('C:\a\valid\path' =~ Stdlib::Windowspath) If that fails, please report the issue against stdlib. (Or I am blind and there is something not right about the path). Best, - henrik Em segunda-feira, 9 de janeiro de 2017 11:16:09 UTC-2, Henrik L

Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-11 Thread Henrik Lindberg
On 09/01/17 14:22, Martin Alfke wrote: Hi Henrik, A non-existent type will in some versions of puppet be taken as being a resource type. One thing you can check is that your module (where you are using Stdlib::XXX types have declared a dependency on Stdlib in its metadata. If it does not

<    1   2   3   4   5   >