[Puppet Users] scope of variable inside defined type

2014-11-17 Thread Rajgourav Jain
Hi, I have written two defined type and trying to use some variables between them. foo/manifest/init.pp define foo( $x=undef, $y=undef) { if $x == undef { $xx = $defualt_x } else { $xx = $x } if $y == undef { $yy $defualt_y } else { $yy= $y } fooins

[Puppet Users] How best to use hiera for Java options? (with hash_merge)

2014-11-17 Thread Steven Post
Hi, I've been using puppet for over a year now, but now I have a problem, and I'm not seeing a solution. I have a hash to set up Java application servers in hiera, these get 'deeper' merged so we don't need duplicate declarations of every little option. Inside the manifest, the create_resources

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

2014-11-17 Thread Steven Post
Hi, The simplest I can think of would be to set up '$yy' as a parameter, and then pass that one down from install.pp However, looking at this limited code snippet, perhaps you shouldn't even have a define in the install.pp, but a class that inherits from 'foo'. Then you can access the $yy variab

[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): Facter.add(:t

[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): Fact

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

2014-11-17 Thread jcbollinger
On Monday, November 17, 2014 2:06:25 AM UTC-6, Rajgourav Jain wrote: > > Hi, > > I have written two defined type and trying to use some variables between > them. > > foo/manifest/init.pp > define foo( $x=undef, $y=undef) > { > > if $x == undef { >$xx = $defualt_x > } el

[Puppet Users] Re: How best to use hiera for Java options? (with hash_merge)

2014-11-17 Thread jcbollinger
On Monday, November 17, 2014 4:11:09 AM UTC-6, Steven Post wrote: > > Hi, > > I've been using puppet for over a year now, but now I have a problem, and > I'm not seeing a solution. > I have a hash to set up Java application servers in hiera, these get > 'deeper' merged so we don't need duplicat

[Puppet Users] Re: puppet 3.7.2 and using cloudstack_resources = need ruby 1.9.3 ... any help?

2014-11-17 Thread jcbollinger
On Wednesday, November 5, 2014 7:41:59 AM UTC-6, Luca Gioppo wrote: > > I started by installing puppet (puppet master + puppetdb etc) from RPM > (yum.puppet) on a CentOS 6.5. > Since I want to test the "cloudstack_resource" module I saw that it needs > fog and it needs ruby 1.9.3. > > So tr

[Puppet Users] invalid checksum using template

2014-11-17 Thread Felice Pizzurro
Hi all, I'm simply tryng to push a file with content in template: file {'/tmp/test': ensure => present, content => template('modulename/template_file.erb') } Template file contains a line like this: {FOO}. note final dot character. The file is correctly created but I have the following er

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

[Puppet Users] Issue getting new custom fact to work in OS X

2014-11-17 Thread Jonathan Cohen
I'm trying to get a new custom fact working in OS X. Source information is from: https://github.com/grahamgilbert/grahamgilbert-mac_facts/blob/master/lib/facter/mac_admin_users.rb Here is the process that I went through. I added the .rb file to /etc/facter/facts.d/mac_admin_users.rb and modi

[Puppet Users] syncronizing many files ( more than 100,000 ) with "puppet agent -t" is slow

2014-11-17 Thread Seokhee Kim
Hi, We have some special case to use Puppet which need to sync many and many files but just few files are updated ( delete, created or updated ). Is there any way to sync just for changed files? now I am syncing whole dir with purge option. And I realized it's getting slower and slower based on n

Re: [Puppet Users] syncronizing many files ( more than 100,000 ) with "puppet agent -t" is slow

2014-11-17 Thread Trevor Vaughan
Hi Seokhee, You might want to move to using rsync for this type of activity https://github.com/onyxpoint/pupmod-rsync. Thanks, Trevor On Mon, Nov 17, 2014 at 6:32 PM, Seokhee Kim wrote: > Hi, > We have some special case to use Puppet which need to sync many and many > files but just few files

[Puppet Users] trying to use a puppet forge module that uses a different style

2014-11-17 Thread Craig White
Not that it matters, but I am trying to use a module out of puppet forge - camptocamp-openldap https://github.com/camptocamp/puppet-openldap There's no hint of using it anywhere It has an unusual style. There isn't any init.pp and the structure looks like this... ├── client │ ├── config.pp │

[Puppet Users] SSL issues arising from cloning environment

2014-11-17 Thread Roger Sherman
I'm in the process of setting up a staging environment for the company I work for. To do this, we've cloned our production environment (vmware), changed the hostnames of the nodes, re-IP'd the nodes, and since that point, I've been trying to get the environment to the point where I can do puppe

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

2014-11-17 Thread Rajgourav Jain
Thanks Steven and jcbollinger for the suggestion. Either solution works for me and I have parameterized define type foo::install and it works. Since I will be calling foo module multiple time for a node I have to keep foo/init.pp as defined type. Thanks, Rajgourav Jain On Monday, November