Re: [Puppet Users] using ruby dsl in puppet manifest

2014-05-08 Thread Henrik Lindberg
On 2014-08-05 19:03, Ritesh Nanda wrote: Hello , I would like to use ruby dsl in my manifest . Online doc for this topic is very limited , i am stuck at a place where i want to use ruby DIr class to find a particular file in a directory and then run operation on it . Is it possible to use ruby

Re: [Puppet Users] using ruby dsl in puppet manifest

2014-05-08 Thread Henrik Lindberg
On 2014-08-05 19:36, Ritesh Nanda wrote: Thanks Henrik , I would like to find a file and parse it , so that would be on the agent , creating a puppet function would not work , as master will not be able to access those files. You said Can be done with Resources , how can i include a ruby bloc

Re: [Puppet Users] Parsing issues in 3.5

2014-05-10 Thread Henrik Lindberg
On 2014-09-05 19:22, Joe Topjian wrote: Hello, I keep running into several parsing issues in 3.5 that don't exist in Puppet 3.4. I saw the thread about issues with the future parser and defined types: https://groups.google.com/forum/#!topic/puppet-users/HOVnQ1EXwjY I'm using the future parser

Re: [Puppet Users] Node definitions in 3.6 directory environments

2014-05-19 Thread Henrik Lindberg
On 2014-19-05 10:05, Paul Seymour wrote: Hello, Could I ask for a little clarification over node definitions in 3.6+ and directory environments please. On our 2.7 masters we have an /etc/puppet/manifests/site.pp with some defaults within it. import "nodes/*.pp" filebucket { 'main': server

Re: [Puppet Users] puppet class require fails depending on declaration order

2014-05-19 Thread Henrik Lindberg
On 2014-14-04 16:43, jcbollinger wrote: On Friday, April 11, 2014 10:10:37 PM UTC-5, David Portabella wrote: I didn't know about this /evaluation-order dependency./ Why does this "evaluation-order dependency" exists in puppet? Do you mean this particular one, or evaluation-order dep

Re: [Puppet Users] Facts can override variables set by puppet master

2014-05-20 Thread Henrik Lindberg
On 2014-20-05 13:02, Boyan Tabakov wrote: Hi, On Mon May 19 16:39:25 2014, jcbollinger wrote: On Monday, May 19, 2014 6:06:45 AM UTC-5, Boyan Tabakov wrote: Hi, The variable I want to access is not defined in a module/class. It's the globally defined $::environment. Sinc

Re: [Puppet Users] Tracking orphaned resources

2014-05-29 Thread Henrik Lindberg
On 2014-29-05 15:58, Martin Langhoff wrote: As the complexity of our $workplace puppet configuration grows, I am increasingly worried that puppet gives us very limited visibility over resources it no longer manages. In practical terms: if I mess up my class include/require/inherit structure so t

Re: [Puppet Users] what is actually "undefined method 'include?' for nil:NilClass on node" error?

2014-05-29 Thread Henrik Lindberg
On 2014-29-05 21:57, Sans wrote: I have two identical nodes - serv106 and serv107- one of which is working just fine but the other one failing with these error message: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `include?' for nil:NilClass

Re: [Puppet Users] what is actually "undefined method 'include?' for nil:NilClass on node" error?

2014-05-30 Thread Henrik Lindberg
On 2014-30-05 20:54, Sans wrote: Hi Henrik, I don't really use WEBrick but apache/passenger for the normal operation. I think WEBrick is used to run puppet master in background in debug mode. Is there a way to use apache/passenger for that? Anyway, I'm running puppet v2.7.3 and getting the same

Re: [Puppet Users] future parser changes undef to string inside create_resources (tested on puppet 3.5.1 and puppet 3.6.1)

2014-06-02 Thread Henrik Lindberg
On 2014-31-05 2:15, Robert wrote: I've stumbled upon this very annoying bug with the future parser where it's replacing undef with empty strings when passed inside a hash to create_resources(). test.pp = define test($var = undef) { notice inline_template("<%= @name %> is <% if @var %>

Re: [Puppet Users] Puppet update to 3.6.1 causes Error 400 on SERVER: no 'environments' in ...

2014-06-02 Thread Henrik Lindberg
On 2014-27-05 15:23, Anton Lindstrom wrote: There's a ticket open for that issue at https://tickets.puppetlabs.com/browse/PUP-2659 Fix will be released in 3.6.2. Until then the recommendation is to use Passenger (Note that Webrick is not recommended for production even when this bug is fixed).

Re: [Puppet Users] Re: Conditional Creates Attribute

2014-06-02 Thread Henrik Lindberg
On 2014-29-05 19:59, jcbollinger wrote: On Thursday, May 29, 2014 9:23:54 AM UTC-5, Mark McFate wrote: I'm probably going about this all wrong, but I have an instance where I've employed a Puppet module and need to _sometimes_ add a "creates" attribute to one of the exec's defined

Re: [Puppet Users] modelling languages puppet

2014-06-13 Thread Henrik Lindberg
On 2014-13-06 18:36, cheniour ghassen wrote: Hi everyone, I have developed a puppet script for automating openstack configurations. Now i have to make UML diagrams to model my puppet script. I need to make a class diagram. But i didn't figure how because i have modules and not packages, i have de

Re: [Puppet Users] define variables in puppet manifests from text file

2014-06-23 Thread Henrik Lindberg
On 2014-23-06 9:04, Ankita kumari wrote: Hi, I want to pass the variables in puppet manifests from text file. The text file contains a list of values in different lines. I want to pass these values to the variables defined in the manifest. .pp files are text files ;-) In older puppet versions

Re: [Puppet Users] What is the execution order in a manifest file

2014-06-26 Thread Henrik Lindberg
On 2014-25-06 14:04, Malintha Adikari wrote: How can I define the order of execution in this kind of scenario ? This explains how it works: http://puppet-on-the-edge.blogspot.se/2014/04/getting-your-puppet-ducks-in-row.html -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blo

Re: [Puppet Users] "Each" loop issue

2014-07-01 Thread Henrik Lindberg
On 2014-30-06 23:58, martin.li...@gmail.com wrote: Hi Puppet users! I'm having an issue with "each loop" on puppet, and I just can't figure out what am I doing wrong, so any help will be much appreciated. Here is my test.pp example: class mytestclass { $stuff = ["1", "2", "3"] each($stu

Re: [Puppet Users] "Each" loop issue

2014-07-03 Thread Henrik Lindberg
On 2014-03-07 23:00, martin.li...@gmail.com wrote: Hi Ellison, That's right. That seems to be the case. I've been googling around, and seems that the new parser has a different scope from where it can grab the variables. Sadly, I can't find the way to make it work. Should I include something spe

Re: [Puppet Users] "Each" loop issue

2014-07-04 Thread Henrik Lindberg
On 2014-04-07 14:59, Martin wrote: Henrik, Thank you for such clear reply!.. I'll start debugging to find out what I'm missing here. I want to thank you for your support to the Puppet community, developing or taking the time to answer here in the list, your participation is really appreciated.

Re: [Puppet Users] Checking a variable is not 'undef'

2014-07-12 Thread Henrik Lindberg
On 2014-11-07 16:38, Chris Cowley wrote: OK, so what it the recommended way to do this? Somehow it is not something I have come up against before, I have the impression that it is a lot harder than simply: if $variable { do stuff } In version before Puppet 4.0.0 the values as boolean map li

Re: [Puppet Users] Checking a variable is not 'undef'

2014-07-13 Thread Henrik Lindberg
On 2014-13-07 14:57, Felix Frank wrote: On 07/13/2014 03:36 AM, Henrik Lindberg wrote: "falsey": empty string, false, undef "truthy": everything else In Puppet 4.0.0 this will be: "falsey": false, undef "truthy": everything else Oops? I

Re: [Puppet Users] Checking a variable is not 'undef'

2014-07-14 Thread Henrik Lindberg
or indeed changes in your own modules). Regards - henrik El 13/07/2014 18:32, "Henrik Lindberg" mailto:henrik.lindb...@cloudsmith.com>> escribió: On 2014-13-07 14:57, Felix Frank wrote: On 07/13/2014 03:36 AM, Henrik Lindberg wrote: "falsey

Re: [Puppet Users] Puppet catalog transfer often gets truncated (Could not intern from pson: error)

2014-07-15 Thread Henrik Lindberg
On 2014-15-07 23:12, Felix Frank wrote: On 07/15/2014 01:47 PM, Daniel wrote: I am also getting this problem. Did running the puppet master within Apache/Passenger or nginx/Passenger help at all? I was thinking it could be to do with a non ascii character making its way into my code somewhere a

Re: [Puppet Users] Re: Passing undef as argument to classes & defines overrides default parameter

2014-07-20 Thread Henrik Lindberg
On 2014-17-07 20:26, Cristian Falcas wrote: Hi, I have a "postfix" class with this init: class postfix ( $ensure = 'latest', $email_user = undef, $email_pass = undef, $smtp_endpoint = "smtp.${::domain}", $smtp_endpoint_port = '25', $from_domain

Re: [Puppet Users] Weekly parameter for the cron resource behaves differently with future parser

2014-07-21 Thread Henrik Lindberg
On 2014-21-07 8:23, David Schmitt wrote: On 2014-07-16 17:03, Peter Van Biesen wrote: Hi, I just ran into an issue with the future parser. I had following statement in my manifests : cron {'zorgregieRapportering': command => "/usr/projects/admintools/cronWrap.bash -s /home/weblogic/JOB/

Re: [Puppet Users] custom function to read inifile

2014-07-23 Thread Henrik Lindberg
On 2014-22-07 23:36, Ritesh Nanda wrote: Hello , I was trying to write a custom function which would run on puppet master take input a ini file , parse a section of that ini file and assign its value to a variable .. Something like $test = iniread('example.ini', 'Program', 'path') This would a

Re: [Puppet Users] Getting Variables out of define in site.pp

2014-07-24 Thread Henrik Lindberg
On 2014-24-07 14:27, Werner Flamme wrote: em...@benjaminmertens.de [24.07.2014 12:42]: # site.pp define iterateSystemRole { case $name { 'app1': { include app1 $defineVariable = 'content' }

Re: [Puppet Users] Variable interpolation challenge

2014-08-27 Thread Henrik Lindberg
On 2014-27-08 15:02, Gav wrote: Aaron, have you had problems with this in Puppet 3? Using similar code in 3.6.0 does not return the fact value. Cheers, Gavin On Tuesday, 24 May 2011 16:22:23 UTC+1, Aaron Grewell wrote: Thanks Nan, until they make a function out of that I'll keep the te

Re: [Puppet Users] inline template variable access

2014-09-11 Thread Henrik Lindberg
On 2014-11-09 16:04, Brandon Metcalf wrote: On Sunday, September 7, 2014 9:39:56 AM UTC-5, Felix.Frank wrote: On 09/06/2014 11:09 PM, Spencer Krum wrote: > > $java_home = $java_home_var > > Barring that, this is the correct way to use a template: > > $java_home

Re: [Puppet Users] inline template variable access

2014-09-11 Thread Henrik Lindberg
On 2014-11-09 22:57, Brandon Metcalf wrote: On Thursday, September 11, 2014 12:56:50 PM UTC-5, Henrik Lindberg wrote: On 2014-11-09 16:04, Brandon Metcalf wrote: > > On Sunday, September 7, 2014 9:39:56 AM UTC-5, Felix.Frank wrote: > > On 09/06/2

Re: [Puppet Users] inline template variable access

2014-09-11 Thread Henrik Lindberg
On 2014-12-09 1:06, Henrik Lindberg wrote: On 2014-11-09 22:57, Brandon Metcalf wrote: On Thursday, September 11, 2014 12:56:50 PM UTC-5, Henrik Lindberg wrote: On 2014-11-09 16:04, Brandon Metcalf wrote: > > On Sunday, September 7, 2014 9:39:56 AM UTC-5, Felix.Frank

Re: [Puppet Users] [Error after after upgrading to 3.7] Evaluation Error: Illegal Resource Type expression, expected result to be a type name, or untitled Resource, got Type[Class]

2014-09-15 Thread Henrik Lindberg
On 2014-12-09 14:57, Juan Sierra Pons wrote: Hi, I am using a mix of the following two blog post: [1] A modern Puppet Master from scratch [2] Puppet Infrastructure After upgrading to 3.7 I am getting the following error message Error: Could not retrieve catalog from remote server: Error 400

Re: [Puppet Users] [Error after after upgrading to 3.7] Evaluation Error: Illegal Resource Type expression, expected result to be a type name, or untitled Resource, got Type[Class]

2014-09-19 Thread Henrik Lindberg
On 2014-17-09 17:37, jcbollinger wrote: On Tuesday, September 16, 2014 12:26:24 PM UTC-5, Juan Sierra Pons wrote: Hi guys, From your comments I see that there are 2 issues here the parser and the anchor. For clarity shake I have deleted the anchor resources and Class defaults

Re: [Puppet Users] puppetlabs-* forge modules and 'parser = future'

2014-09-29 Thread Henrik Lindberg
On 2014-30-09 24:30, Hunter Haugen wrote: On Thu, Sep 18, 2014 at 2:16 PM, Tim Skirvin mailto:tskir...@fnal.gov>> wrote: I decided to try out 'parser = future' today, and the first thing to fail was puppetlabs-apache, with errors along the lines of: Filepath:

Re: [Puppet Users] Re: can't find node definition puppet 3.7.1

2014-10-01 Thread Henrik Lindberg
On 2014-30-09 15:35, jcbollinger wrote: On Tuesday, September 30, 2014 3:29:23 AM UTC-5, Benjamin Priestman wrote: I've always used import, not include to get my node definitions into site.pp. the new way of doing it, I believe, is to use a manifest directory. See https://docs.

Re: [Puppet Users] Re: Puppet 3.7.1 parse problems with resource overrides.

2014-10-01 Thread Henrik Lindberg
On 2014-23-09 13:25, Stefan Heijmans wrote: Hi, Received the same kind of error with a different message, using Puppet 3..7.2 with future parser; Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '[' at /etc/puppet/environments/tst/modules/managesoft/mani

Re: [Puppet Users] Could not retrieve catalog from remote server: end of file reached

2014-10-01 Thread Henrik Lindberg
On 2014-01-10 19:21, Bret Wortman wrote: This is happening on some of my clients. It'll happen about 1 out of 20 runs, but it's really getting to be a problem. There's nothing indicative in /var/log/messages or any other server-side log that I can find, and this is all the output I'm seeing on th

Re: [Puppet Users] Re: Hash of hashes to file template

2014-10-06 Thread Henrik Lindberg
On 2014-06-10 20:47, Ciro Iriarte wrote: El lunes, 6 de octubre de 2014 10:52:05 UTC-3, jcbollinger escribió: On Sunday, October 5, 2014 5:55:55 PM UTC-5, Ciro Iriarte wrote: Hi!, I'm starting to work with hiera and file templates, how would be the best way to transform

Re: [Puppet Users] Overriding class parameters using a collector

2014-10-17 Thread Henrik Lindberg
On 2014-17-10 19:29, Vladimir Brik wrote: Hello, Is it possible to override parameters of a class using a collector? (similarly to https://docs.puppetlabs.com/puppet/latest/reference/lang_resources.html#amending-attributes-with-a-collector) No, that does not work. In 4.0 you will get a specif

Re: [Puppet Users] Re: Puppetmaster can't keep up with our 1400 nodes.

2014-11-03 Thread Henrik Lindberg
On 2014-03-11 17:39, Georgi Todorov wrote: On Friday, October 31, 2014 9:50:41 AM UTC-4, Georgi Todorov wrote: Actually, sometime last night something happened and puppet stopped processing requests altogether. Stopping and starting httpd fixed this, but this could be just some bug

Re: [Puppet Users] puppet 3.6.2, parse time error about storeconfigs

2014-11-05 Thread Henrik Lindberg
On 2014-06-11 1:30, Tristan Smith wrote: So, I'm trying to be a good citizen and use more forge code. I run puppet parser validate across all manifests as part of this - which results in much hilarity and tears. The latest one was when I pulled in puppetlabs/apache. .../modules/apache/manifests

Re: [Puppet Users] Re: creating hashes from other hashes

2014-11-07 Thread Henrik Lindberg
On 2014-07-11 23:43, Tim Mooney wrote: In regard to: [Puppet Users] Re: creating hashes from other hashes, Luke...: Huh, at first glance that to me looks like a parser bug. Not so much a bug as an unessesary constraint. This is changed in Puppet 4.0 (and when using --parser future in late 3x

Re: [Puppet Users] puppet 3.6.2, parse time error about storeconfigs

2014-11-07 Thread Henrik Lindberg
On 2014-07-11 1:14, Tristan Smith wrote: Thanks, I failed to find it in Jira. Glad to know it's something already in the roadmap. Yeah, it is in a ticket that is about removing validation from the grammar (or somesuch). - henrik On Wed, Nov 5, 2014 at 5:10 PM, Henrik Lin

Re: [Puppet Users] Puppet variable within a Fact

2014-11-17 Thread Henrik Lindberg
On 2014-17-11 12:40, Antoine Cotten wrote: Dear fellow Puppet users, Is there any convenient way to access a variable defined in a Puppet class from within a custom fact? Facts come before puppet variables. At best you can get some value from the *previous* catalog application by writing it

Re: [Puppet Users] Anyone made parser = future working on CentOS 6.5 & Ruby 1.8.x?

2014-11-27 Thread Henrik Lindberg
On 2014-22-11 22:11, Felix Frank wrote: On 11/21/2014 04:16 PM, Larry Liu wrote: Hi everyone, According to puppetlab's doc, parser=future is supposed to work with puppet version 3.5 or higher. I'm on 3.7.1 which falls under https://docs.puppetlabs.com/puppet/latest/reference/experiments_future.

Re: [Puppet Users] Another book on Puppet

2014-12-01 Thread Henrik Lindberg
Congratulations Felix ! - henrik On 2014-30-11 15:24, Felix Frank wrote: Hi all, it's with great pride that I follow Alessandro with yet another plug of relevant literature. My first book, Puppet Essentials, is available as of right now. Check it out: http://bit.ly/1zoGxbW It's suitable for

Re: [Puppet Users] Notify: log only the message itself at 'notice' level

2014-12-03 Thread Henrik Lindberg
On 2014-02-12 8:58, Nacho Barrientos wrote: On 01/12/14 16:25, Spencer Krum wrote: Maybe you could use the notice() or warn() functions? Those would log server-side, wouldn't they? I want to see it on the client console and on the Puppet report :) Yes that is true. There is no current supp

Re: [Puppet Users] Defined type parameter defaults not set (undef)

2014-12-03 Thread Henrik Lindberg
On 2014-03-12 15:35, Martijn Grendelman wrote: Hi, Please consider the following simplified code: class apache::params { $priority = 25 } define apache::vhost ( $priority = $::apache::params::priority ) { include apache::params notify { "$name prio 1: $apache::params::priority": } notify { "

Re: [Puppet Users] Styling parameter and variable types

2014-12-11 Thread Henrik Lindberg
On 2014-11-12 24:33, Martin Alfke wrote: Hi Daniele, many thanks for bringing up the Type style question. On 10 Dec 2014, at 14:23, Daniele Sluijters wrote: With the future parser we can now add type annotations to a whole bunch of things. Usually it's pretty easy, just chuck the type in fr

Re: [Puppet Users] Running future parser in production

2014-12-12 Thread Henrik Lindberg
On 2014-12-12 2:59, Erik Dalén wrote: Just wanted to say that we have now switched completely to the future parser at Spotify, and it is working well. Still have some work to do to take advantage of all the new stuff, it is still mostly the old manifests running on the new parser. We had some

Re: [Puppet Users] is there a way to compare one facts with all other facts in the list

2014-12-13 Thread Henrik Lindberg
On 2014-10-12 12:03, Spriya wrote: Hi, I have a requirement that, *I have list of two different facts* *java_foundversion1_path1 java_foundversion2_path2 java_foundversion3_path3 java_foundversion4_path4* *and java_authorizedversion1path1 java_authorizedversion2path2 java_authorizedversion3pa

Re: [Puppet Users] compare two variables via regex

2014-12-13 Thread Henrik Lindberg
On 2014-05-12 16:43, Ramin K wrote: On 12/5/14 3:16 PM, Lori Cho wrote: I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'f

Re: [Puppet Users] dynamically named variables?

2014-12-15 Thread Henrik Lindberg
On 2014-15-12 18:57, Guy Matz wrote: Hi! I have a parameterized class that accepts a few parameters, one of which I would like to use in the retrieval of hiera data, e.g. class foo ( $app_user = 'bar' ) { file { "/etc/${app_user::etc_dir}": What do you expect the result to be here, are you

Re: [Puppet Users] Conditional Require For File Type

2015-01-16 Thread Henrik Lindberg
On 2015-15-01 15:53, jcbollinger wrote: On Wednesday, January 14, 2015 at 8:08:25 PM UTC-6, Felix.Frank wrote: On 01/14/2015 03:47 PM, Jason Wever wrote: > Hi All, > > I having a problem in where I'm defining a File Type and setting the > requires parameter to use a var

Re: [Puppet Users] Puppet Experimental Features like parser=future

2015-01-21 Thread Henrik Lindberg
On 2015-21-01 11:25, shashank wrote: Hi All, I was using puppet since the release of puppet 2.6 version in various projects.Now came across the "Puppet Experimental Features" in the Puppet 3.x series and some of which are really very useful for projects I was taking care of. My concern is that

Re: [Puppet Users] Syntax Error in Puppet Learning VM

2015-01-26 Thread Henrik Lindberg
On 2015-26-01 21:15, John Julien wrote: Hi, Is this the right place to report errors in the Puppet Learning Guide? I have found a syntax error on page 57 while executing Task 2 of the Variables and Class Parameters quest. | file {"${doc_root}/bonjour.html"} ensure=>'present', content =>"${fr

Re: [Puppet Users] RSpec -> NoMethodError: undefined method `split' for nil:NilClass

2015-01-27 Thread Henrik Lindberg
On 2015-27-01 15:42, Frederic Conrotte wrote: Hello I wrote the following spec file for my module: require'spec_helper' describe('apache_tomcat',:type=>:class)do let(:node) {$fqdn} context'with defaults for all parameters'do it{shouldcompile } end end But when I run test I have

Re: [Puppet Users] iteration in future parser doesn't handle hashes as documented

2015-02-15 Thread Henrik Lindberg
On 2015-15-02 23:52, Jo Rhett wrote: Opened as https://tickets.puppetlabs.com/browse/PUP-4015 You are bit by "stringify_facts" (see ticket for explanation). - henrik On Feb 15, 2015, at 2:49 PM, Jo Rhett mailto:jrh...@netconsonance.com>> wrote: From documentation at https://docs.puppetlabs

Re: [Puppet Users] Environment with multiple subdirectories

2015-02-18 Thread Henrik Lindberg
On 2015-17-02 17:56, hans...@nd.edu wrote: I'm attempting to switch over from using configuration directories to using environments. Right now, we have various directories with puppet classes and the puppet server might look in all directories for the class it needs. So, we have a modulepath wh

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 strings

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 ha

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 referen

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 correct

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 fi

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 --environ

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 "puppet:.epp

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 /etc

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] 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 st

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 wrote: 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

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, puppe

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 serve

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 use

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Henrik Lindberg
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 wrote: 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_Vers

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 /etc/puppetlabs/pupp

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 resource

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: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. S

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] 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 Intell

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 environmen

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 I

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 w

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] 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 it

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: $inp

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: ucb::mai

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] function that returns parameters from a webservice

2016-06-11 Thread Henrik Lindberg
ng it that way would be idiomatic puppet. In your logic above, you will run into errors if values are missing in the json hash - for example $config['this']['that'] would error if there is no value at $config['this']. However... This would be much easier if you

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 someth

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 li

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 Alex

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-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] 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 =>Arr

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 r

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] 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 somet

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 en

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 to

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 Monday, September 19, 2016 at 10:03:14 AM UTC-5, R.I. Pienaar

<    1   2   3   4   5   >