Re: [Puppet Users] Puppet variable within a Fact

2014-11-18 Thread Antoine Cotten
True, I could try the file approach, the only drawback is that it would take 1 Puppet run before the fact is defined, but the same would hold true with the environment variable. Thanks Henrik! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To

[Puppet Users] Re: scope of variable inside defined type

2014-11-18 Thread Antoine Cotten
What about the getparam function from the stdlib module https://forge.puppetlabs.com/puppetlabs/stdlib? Quote: define example_resource($param) { } example_resource { example_resource_instance: param = param_value } getparam(Example_resource[example_resource_instance], param) -- You

[Puppet Users] Puppet variable with a custom fact

2014-11-17 Thread Antoine Cotten
Hi Puppet users, Is there any convenient way to access a variable defined in a Puppet class from within a custom fact? I'm trying to reuse a Puppet variable within a fact definition, but can't find any way to look it up like I would do within an ERB template. Example (fictional):

[Puppet Users] Puppet variable within a Fact

2014-11-17 Thread Antoine Cotten
Dear fellow Puppet users, Is there any convenient way to access a variable defined in a Puppet class from within a custom fact? I'm trying to reuse a Puppet variable within a fact definition, but can't find any way to look it up like I would do within an ERB template. Example (fictional):

[Puppet Users] Re: Cannot set variables via Hiera for a module I've written

2014-09-25 Thread Antoine Cotten
Hi Danny, You should 'include' your main class (zabbix) before, or even inside your sub-classes, else nothing tells you in which order they will be declared, and apparently classes like zabbix::client::service DO require the parameters set in your main class. Something like that should work:

Re: [Puppet Users] Example of how to use require with hiera?

2014-09-22 Thread Antoine Cotten
Does this actually work Nan?? Can somebody point me to any page where this is documented? Toni On Friday, September 19, 2014 6:33:07 PM UTC+2, Nan Liu wrote: On Thu, Sep 18, 2014 at 6:19 PM, Daniel Johnson tekn...@gmail.com javascript: wrote: Things like require: File['somefile'] or

[Puppet Users] Re: Locally Written Puppet Module Does Not Dislay Version Number With: puppet module list

2014-09-19 Thread Antoine Cotten
What nikolavp said is true, the metadata.json became the standard starting from Puppet 3.6, but since you use 3.5 the Modulefile still prevails. Off subject: any reason not to upgrade your master? I have really bad memories of Puppet 3.5 on CentOS, whereas 3.6 fixed all my troubles. Would also

[Puppet Users] Re: Example of how to use require with hiera?

2014-09-19 Thread Antoine Cotten
Hi teknotus, I don't think that would work since you can not declare a Puppet resource in Hiera, you are limited to core types. In your case, Puppet would interpret File['somefile'] as a string, and File: somefile as a hash, but will never translate that to a resource. Cheers, Toni -- You

[Puppet Users] puppetlabs-apache n00b question - docroot value for fully proxied virtual host?

2014-09-16 Thread Antoine Cotten
Unfortunately you can't. This is a restriction of Apache, which requires a docroot value for every vhost, and not of Puppet. -- 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

[Puppet Users] Re: Moving away from Puppet Enterrpize piecemeal?

2014-09-06 Thread Antoine Cotten
Hi Matthew, I also moved from PE to Puppet Open-Source. I actually got started with the 10 nodes free licence before feeling comfortable enough to puppetize my 60 VMs, so the operation was performed at much smaller scale than in your case probably. From what I experienced: 1)

[Puppet Users] Re: client not seeing changes made on puppetmaster

2014-09-05 Thread Antoine Cotten
Hi Mike, It's very likely due to Directory Environments caching. By the default the environment timeout https://docs.puppetlabs.com/references/3.7.latest/configuration.html#environmenttimeout is 3m, which means you whole environment will cached during this time. You can enforce the value of

[Puppet Users] Problem with Hiera deep merge

2014-07-25 Thread Antoine Cotten
Hi Puppet users, I've been using Hiera's deep merge feature on class parameters for months, however when I try to pair it with the create_resources function things get ugly. Situation: I want to deploy a set of Unix users on all my machines. They have standard rights by default and get access

[Puppet Users] Re: Problem with Hiera deep merge

2014-07-25 Thread Antoine Cotten
*Btw, please ignore the typo (missing parenthesis) in the manifest, trust me it's not here in the real manifest.* Funny fact I just discovered: if I move the $user parameter INSIDE the code of the class, and get rid of the class parameter (of course) it works just fine. So why would the

[Puppet Users] Re: Problem with Hiera deep merge

2014-07-25 Thread Antoine Cotten
I actually found the answer in another topic https://groups.google.com/forum/#!searchin/puppet-users/Puppet$203.1.1$2C$20hiera$20and$20parameter$20autoload/puppet-users/FezqytcHBeA/BC5xKG5e78cJ . I changed my variable name to $unixusers instead of $users and it started working. I suspect a

Re: [Puppet Users] Re: Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-05-12 Thread Antoine Cotten
Hi Josh, hi all, So, I have set the environment_timeout setting to a couple of test values, including 30s, 1h and unlimited: - *30s* - No performance boost. Too short for me, my Puppet runs are distributed every 37s - *1h* - Very good results, fast config retrieval, even slighly

Re: [Puppet Users] Re: Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-05-09 Thread Antoine Cotten
Partlow wrote: On Wed, May 7, 2014 at 6:24 AM, Antoine Cotten tonio@gmail.comjavascript: wrote: Thanks Josh, This seems to work better indeed, although I can still observe a decrease in performances. The config retrieval time is higher than with config-based environments (9 sec

[Puppet Users] Re: Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-05-07 Thread Antoine Cotten
on obtaining the packages) thanks, Josh On Tuesday, April 22, 2014 11:26:47 AM UTC-7, Eric Sorenson wrote: On Tuesday, April 22, 2014 5:25:55 AM UTC-7, Antoine Cotten wrote: Hi Eric, thank you for pointing me to this feature, and sorry for the answer time. I managed to outline

[Puppet Users] Re: Best practice question: Class(es) with client/server config

2014-04-25 Thread Antoine Cotten
I don't pretend to give you best practices here, but I would personally create one cups class as an entry point, with two (at least) boolean parameters: client and server. client defaults to true and server to false, either using class defaults or Hiera's base hierarchy level. Then you could

Re: [Puppet Users] Re: using custom array based fact with defined type

2014-04-23 Thread Antoine Cotten
Actually Facter does support arrays since v2.0.1, Ritesh did not mention which version he was using. Ritesh if you use Facter 2.0.1 I recommend you to make sure your fact is an actual Structured Fact, like described in this documentation page: Facter 2.0: Overview of Custom Facts With

[Puppet Users] Re: Package With 'yum' Provider Uses 'rpm' to Remove a Package (bug?)

2014-04-23 Thread Antoine Cotten
Hi Jon, this is more like a security mechanism to prevent YUM from removing dependencies in a very unexpected and unattended way. From my experience I have already tried to achieve such thing: I wanted to get rid of sendmail but this also deleted critical packages such as cron (!). Using RPM

[Puppet Users] Re: Copying files between nodes

2014-04-23 Thread Antoine Cotten
Hi Warden, Exporting a file resource will not export its content, unless the content is part of the resource (ie. using content = or source = ). By just giving a path you will always end-up with an empty file. I guess a better approach would be to maintain all files somewhere on your Puppet

[Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread Antoine Cotten
Could you please post the result of: validate_array($::arraydev) ? You need to have the puppetlabs/stdlib module installed Toni On Tuesday, April 22, 2014 1:27:21 AM UTC+2, Ritesh Nanda wrote: Hello , I have a custom facts which returns the block devices based on some condition in an

[Puppet Users] Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-04-17 Thread Antoine Cotten
Dear Puppet Users community, I would like to report an issue I experience since the first release of Puppet 3.5, and possibly get some input from people who face the same problem (if any). I run a Puppet environment in which all 48 nodes run CentOS 6.5. I have been using config file-based