[Puppet Users] Re: Which version of Puppet am I using?

2017-05-04 Thread Sans
Thanks Gav! I see that now. PuppetDB v3 is only compatible with Puppet v4, which I cannot upgrade to it yet. Some issue with newer version of puppetboard module, I suppose, which seems require puppetDB v3 -San On Thursday, May 4, 2017 at 11:11:38 AM UTC+1, Gavin Williams wrote: > >

[Puppet Users] Re: Which version of Puppet am I using?

2017-05-04 Thread Sans
Looks like Puppetforge puppetdb module is doing some thing under the hood. With a vanilla installation, everything seems look right: root@e115-s-pmaster-001:/# dpkg -l|egrep 'puppet((master|db){,1})[ -]'|awk '{printf ("%-22s%s\n",$2,$3)}' puppet3.8.7-1puppetlabs1 puppet-common

[Puppet Users] Which version of Puppet am I using?

2017-05-03 Thread Sans
Dear all, I was just trying to install Puppet v3.8.7 with PuppetDB v3.2.4: root@e115-s-pmaster-001:/# dpkg -s puppet|grep -i version Version: 3.8.7-1puppetlabs1 Config-Version: 3.8.7-1puppetlabs1 # root@e115-s-pmaster-001:/# dpkg -s puppetdb|grep -i version Version: 3.2.4-1puppetlabs1 but

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

2017-01-25 Thread Sans
Hi Henrik, Thanks for commenting. Could you elaborate "Only reference Facter in logic that implements facts" pls? Does it mean when defining, e.g. a custom-fact, it's okay to reference another fact but not anywhere else? People gave me so many advice about dos and don'ts but no one actually

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

2017-01-25 Thread Sans
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 if that's the main issue.

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

2017-01-25 Thread Sans
On Wednesday, January 25, 2017 at 2:20:30 PM UTC, R.I. Pienaar wrote: > > > not been following, but if you're on a recent version @facts["foo"] is the > best > I didn't know that but will check soon. I'm on v3.8.x - will it work there? -S -- You received this message because you are

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

2017-01-25 Thread Sans
> Hi Sans, > > I think your ERB syntax may be off. Here's an example doing something > similar. Instead of Facter.value() just put an @ in front of the fact > name. > > <% @nameservers.each do |nameserver| -%> > nameserver <%= nameserver %> &

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

2017-01-25 Thread Sans
Dear all, I'm having this issue and running out of ideas. I have this two external facts (defined in /etc/facter/facts.d/extn_git_facts.txt): root@p19-d-pmaster-001:~# facter|grep ks_git ks_git_puppet-hiera => master ks_git_puppet-master => develop I want to use these

Re: [Puppet Users] the issues with thias/fooacl: filesystem ACL

2016-05-20 Thread Sans
On Friday, May 20, 2016 at 1:21:24 AM UTC+1, Ken Lareau wrote: > > > If the file changes, fooacl on its own won't notice the change and won't > reset the ACLs. You need to notify the class to ensure it does catch > this. We have something like this for ours that we put after the fooacl >

[Puppet Users] the issues with thias/fooacl: filesystem ACL

2016-05-19 Thread Sans
Hi there, Is anyone using thias/fooacl module? I use it for WordPress, to give www-data read access to wp-config.php and few other files. Every time puppet runs, the file becomes unreadable: # file: wp-config.php # owner: root # group: root

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

2016-04-13 Thread Sans
That was a brilliant idea!! You are a super-star!! Worked like a charm!! -San On Tuesday, March 29, 2016 at 8:05:23 PM UTC+1, Ramin K wrote: > > I think it's simpler to make PHP do the work because templates are > evaluated on the master. > > if(file_exists('/var/www/<%= @title

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

2016-03-29 Thread Sans
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. w.r.t. custom-fact, as I said, it cannot

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

2016-03-29 Thread Sans
@has_wp_extra_config > -%> and you should be good to go. > > Trevor > > On Mon, Mar 28, 2016 at 3:44 PM, Sans <r.sant...@gmail.com > > wrote: > >> Hi there, >> >> I'm setting up a multi-tenancy WordPress environment, where multiple >> sites a

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

2016-03-28 Thread Sans
Hi there, I'm setting up a multi-tenancy WordPress environment, where multiple sites are structured as: /var/www/. Long story short: I want to put a line in the wp-config.php based on existences of a file in wp-content (under each site_location, provided by my users) directory, which I don't

[Puppet Users] directory environemnt doesn't seem to be working for vcsrepo

2016-03-14 Thread Sans
Hi there , I'm seeing a very strange error, which I cannot figure out where it's coming from: *Error: Failed to apply catalog: Parameter revision failed on Vcsrepo[/var/www/wp007/wp-content]: Invalid value "". Valid values match /^\S+$/. at

Re: [Puppet Users] how to safely distibute SSL keys with PuppetMaster

2016-03-08 Thread Sans
On Tuesday, March 8, 2016 at 1:16:13 AM UTC, Matt wrote: > > So I've done this simple with hiera email and using the contents of the > ssl keys and certs as strings for file resources to use with created > resources > > Thanks Matt!! that worked. I think I'm good for now that way. -S --

Re: [Puppet Users] how to safely distibute SSL keys with PuppetMaster

2016-03-08 Thread Sans
On Tuesday, March 8, 2016 at 1:16:13 AM UTC, Matt wrote: > > So I've done this simple with hiera email and using the contents of the > ssl keys and certs as strings for file resources to use with created > resources > > Could you tell me in a bit details how did you do it. I tried but really

[Puppet Users] how to safely distibute SSL keys with PuppetMaster

2016-03-07 Thread Sans
Hi there , I've a situation here, where I need to provide SSL key-pair for Nginx configuration and the SSL keys, that copied on to the agents as file{} resources goes to the repo, which is accessed by a number of people in the organization, which I don't like. What's the general

[Puppet Users] Re: puppet cannot find class.

2016-03-05 Thread Sans
I've never used a module with out a init.pp, so cannot tell you if that's the issue, I think it's not. But normally this what I would do: class all_class::first_class { } and class all_class::dep { } Probably worth giving a try. On a general note, you should have all the owner, group

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

2016-03-05 Thread Sans
Can this look-up done from agent as well? -S 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 subscribed to the Google Groups "Puppet Users"

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

2016-03-04 Thread Sans
I'm on v3.8.4 Can it be run from agent? If it does, then it gonna solve my another issue as well. -San On Thursday, March 3, 2016 at 6:10:33 PM UTC, Henrik Lindberg wrote: > > > If you are on a newer puppet version where the lookup command is > available you can use 'puppet lookup --explain

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

2016-03-03 Thread Sans
Looks like to me it's not getting value from the Hiera at all. How can I make sure of that? -S On Thursday, March 3, 2016 at 1:28:51 PM UTC, Trevor Vaughan wrote: > > Hi Sam, > > Are you 100% sure that $wp_multisite is getting the value from Hiera? > > In this case, it looks like the value is

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

2016-03-03 Thread Sans
Hi guys, Suddenly started getting this error, which I cannot understand why I'm getting this: Error: Evaluation Error: Error while evaluating a Function Call, "" is not a boolean. It looks to be a String at /usr/local/K101/puppet/modules/apps/ manifests/app.pp:32:5 on node.. the line

Re: [Puppet Users] How to run shell command on puppet agent

2016-02-01 Thread Sans
, jcbollinger wrote: > > > > On Friday, January 29, 2016 at 12:43:17 PM UTC-6, Sans wrote: >> >> >> Steve, how you doing?? It's been very long time... >> >> The list-of-users was just an example. The command that I actually wanna >> run is [...]

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

2016-02-01 Thread Sans
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 manually. Sorry guys for the noise

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

2016-01-31 Thread Sans
yes, so many times. -S On Saturday, January 30, 2016 at 10:58:33 AM UTC, Martin Alfke wrote: > > > Have you restarted puppet master process after adding future_parser to > puppet.conf? > > Best, > Martin > > -- You received this message because you are subscribed to the Google Groups

[Puppet Users] How to run shell command on puppet agent

2016-01-29 Thread Sans
Hi all, Just trying to solve a little thing: I understand that inline_template() gets complied on the PM and return the result that is not native to puppet agent . i.e. $ls_users = inline_template("<%= `cat /etc/passwd|awk -F: '{print $1}'` %>") notify { "THE SITE NAME: ${ls_users}": } will

Re: [Puppet Users] How to run shell command on puppet agent

2016-01-29 Thread Sans
n this case. -S On Friday, January 29, 2016 at 6:19:41 PM UTC, Steve Traylen wrote: > > > Hi Santanu, > Hope your well. > This kind of thing is exactly what custom facts are for. Write a custom > fact to report the users. > Steve. > --- > Steve Traylen > > *From:* Sans <

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

2016-01-29 Thread Sans
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 remote server: Error 400 on SERVER:

[Puppet Users] Is there a way to read multiple hiera file from a datadir location?

2015-12-02 Thread Sans
Hi all, Is there way to use multiple Hiera data-source yaml from a fixed location like: /etc/puppet/sites/clients/ ? I see having something like this: :hierarchy: - "clients/*" - default doesn't really work for Hiera. The issues for me There gonna be 100s of .yaml in there and I

Re: [Puppet Users] Re: Possible to overriding Hiera on the run-time?

2015-09-17 Thread Sans
Thanks Craig! I will give it a go tonight and report here back. -S On Thursday, September 17, 2015 at 2:55:23 PM UTC+1, Craig Dunn wrote: > > It's can be done easier than that, although facts is the right > track... You don't actually have to create a fact, you could just > test for the

[Puppet Users] Possible to overriding Hiera on the run-time?

2015-09-16 Thread Sans
Hi there, I got to solve a "rare" issue here which I'm running out of ideas for. In our manifest, we do some conditional git pull (using vcsrepo forgemodule) based on a Hiera variable that set either true or false. We keep the value as false i.e. no git-pull by default but want to set it

[Puppet Users] manage users and ssh_authorized_key from hiera

2015-01-30 Thread Sans
': ensure: present gid: '2002' ssh_users: 'sans': password: '$1$33mRSE$deEDRKq2aGPu0' managehome: true key: 'B3NzaC1yc2EAAAzdqs8etdh' purge_ssh_keys: true groups: - 'admins' - 'networks

Re: [Puppet Users] Puppet array merge failure?

2015-01-30 Thread Sans
Did you check if have ruby-deep-merge (or the equivalent to your OS) installed? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Puppet Users] Re: Glassfish custom provider and 'file does not exist'

2014-10-06 Thread Sans
Hi Gavin, I know it's almost a 2 yrs. old thread but I'm still getting the very same *Could not find a suitable provider for domain* error. Did you able to solve the this prob at all in the end? Best! On Wednesday, October 24, 2012 9:36:33 PM UTC+1, Gavin Williams wrote: Stefan Cheers

Re: [Puppet Users] Re: Glassfish custom provider and 'file does not exist'

2014-10-06 Thread Sans
Hi Gavin, I know it's almost a 2 yrs. old thread but I'm still getting the very same *Could not find a suitable provider for domain* error. Did you able to solve the this prob at all in the end? Best! -- You received this message because you are subscribed to the Google Groups Puppet Users

[Puppet Users] What else in stead of using import keyword?

2014-07-13 Thread Sans
With *import* is being phased out, what's the equivalent? I did go through this deprecation notice http://docs.puppetlabs.com/puppet/latest/reference/lang_import.html#deprecation-notice but didn't really get it. Say, I've some side-wide global variables defines in *sites.pp*:

Re: [Puppet Users] What else in stead of using import keyword?

2014-07-13 Thread Sans
Thanks Felix! it worked. Some reason, I missed that directory as manifest thing when first time I read it. BTW, I'm actually back to square one again: Using Vagrant for the provisioning and it doesn't accept/understand the directory as main manifest, throwing in error: puppet provisioner: *

Re: [Puppet Users] What else in stead of using import keyword?

2014-07-13 Thread Sans
and replace the line 108, with: *if !expanded_manifest_file.file? !expanded_manifest_file.directory?* worked just find for me. Best! On Sunday, July 13, 2014 9:56:06 PM UTC+1, Felix.Frank wrote: On 07/13/2014 10:42 PM, Sans wrote: puppet provisioner: * The configured Puppet manifest is missing

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-18 Thread Sans
Thanks Rakesh! But, as you probably can guess, that didn't change a thing; still getting the same error. I'm not sure if PuppetDB look in the DNS record (as opposed to hosts file), in that case it never gonna work. Best!! -- You received this message because you are subscribed to the Google

[Puppet Users] Re: How to get logs in to the same termianl in agent side

2014-06-18 Thread Sans
I think, you cannot: The manifest is first compiled on Puppet Master and then the catalog (complied manifests) is sent to the agent, where that command actually runs. You can try this instead to see if you get any thing better command= '/pathToShellScript/myScript.sh 21', logoutput =

[Puppet Users] Re: How to get logs in to the same termianl in agent side

2014-06-18 Thread Sans
Another thing, JFYI: I think somewhere you said you are new the Puppet, so get into the habit to follow the style-guide before it's too late, especially for the quote: you are mixing up the double and single quotes. Look at here: http://docs.puppetlabs.com/guides/style_guide.html -- You

[Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
Hi there, Just started using PuppetDB (using the Puppetlabs' module) and getting issues with connection. First it was giving me server Not Found: Error: Unable to connect to puppetdb server (puppet.internal:8081): [404] Not Found Notice: Failed to connect to puppetdb; sleeping 2 seconds

[Puppet Users] Re: Use external facts inside templetes

2014-06-17 Thread Sans
Hi there, First of all, if it's a fact, then you really should be doing *${::key1}* instead. To use it in template, *%= @key1 %* should work just fine. Otherwise, you can have this: *$localkey = ${::key1}* in your init.pp and then *%= @localkey %* in the template but I don't think you gonna

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
Hi Ken, Thanks for the heads up! First of all, it's a VBox VM, provisioned by Vigrant. PuppetMaster and PuppetDB are on the same machine. I did go through those basic checks before posting, which appeared fine: root@puppet:~# telnet puppet.internal 8081 Trying 127.0.1.1... Connected to

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
hi Ken, Right now I'm creating only one VM, co-locating PuppetMaster and PuppetDB to make it simple - destroying and rebuilding. But it always fails - during the provisioning/building and also even after if I login to the machine and run puppet apply. Telnet works fine: root@puppet:~# telnet

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
It's very strange: Until I run puppetdb ssl-setup -f, I get *Error: Unable to connect to puppetdb server (puppet.internal:8081): [404] Not Found* but after that, I get Notice: Unable to connect to puppetdb server (puppet.internal:8081): #Errno::ECONNREFUSED: Connection refused - connect(2)

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
This is just after building a new server: 2014-06-17 23:20:05,246 INFO [p.t.s.w.jetty9-core] Removing buggy security provider SunPKCS11-NSS version 1.7 2014-06-17 23:20:06,036 INFO [p.t.s.w.jetty9-service] Initializing web server. 2014-06-17 23:20:06,132 INFO [p.t.s.w.jetty9-service]

Re: [Puppet Users] PuppetDB connection issue - Failed to connect!!

2014-06-17 Thread Sans
The puppetdb log is attached in the previous post. And, here is the curl output: root@puppet:~# curl 'http://puppet.internal:8080/v2/metrics/mbean/java.lang:type=Memory' { ObjectPendingFinalizationCount : 0, HeapMemoryUsage : { committed : 86220800, init : 8052480, max :

Re: [Puppet Users] how to use variables elsewhere that's defined in a define() type?

2014-06-06 Thread Sans
Okay, here comes the follow-up question. I've changed the zpack_installer, which doesn't do any inline_template() things any more, instead it looks something like this now: define installer::zpack_installer($sure='present', $inst='false',

Re: [Puppet Users] how to use variables elsewhere that's defined in a define() type?

2014-06-06 Thread Sans
I never used the create_resources() and trying to get my head around it. So, how do I [re]write my define() type to work with create_resources() to do the same thing similar to this: class packages::zenpacks::core($pkgs_hash) { define installer::zpack_installer($sure='present',

[Puppet Users] How to use variables elsewhere that defined in a define() type?

2014-06-05 Thread Sans
I have a class something like this, where I'm passing a [hiera] hash ( zpack_hash) to it: class installer::zenpack($zpack_hash) { define zpack_installer($sure='present', $inst='false') { $z_pack = $installer::zenpack::zpack_hash[$name] $zp_ver = inline_template(%=

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

2014-06-05 Thread Sans
No such ENC (other than Hiera). There is also no static node declaration in Puppet; that comes from Hiera. But again, rest of the 50-odd nodes are running just fine the very same way. -San On Monday, June 2, 2014 3:33:12 PM UTC+1, jcbollinger wrote: Is there an ENC involved? Is there a

[Puppet Users] how to use variables elsewhere that's defined in a define() type?

2014-06-05 Thread Sans
I have a class something like this, where I'm passing a [hiera] hash ( zpack_hash) to it: class installer::zenpack($zpack_hash) { define zpack_installer($sure='present', $inst='false') { $z_pack = $installer::zenpack::zpack_hash[$name] $zp_ver = inline_template(%=

Re: [Puppet Users] how to use variables elsewhere that's defined in a define() type?

2014-06-05 Thread Sans
, Felix.Frank wrote: On 06/05/2014 01:06 PM, Sans wrote: Later in my module, how can I use any of the variables (e.g. $zp_repo) that are already defined in the zpack_installer? I strongly disbelieve that this can work. You can access variables defined in classes, but I would be mildly

Re: [Puppet Users] how to use variables elsewhere that's defined in a define() type?

2014-06-05 Thread Sans
Thanks Felix, for the heads up! I was also thinking along the line that variables define() type variables are not accessible from elsewhere. w.r.t. inline_templates, what else would you suggest? The hiera hash that I'm using here is something like this: zpack_four::zpack_core:

[Puppet Users] Re: starting hiera + ntp module

2014-06-01 Thread Sans
On Wednesday, October 9, 2013 4:11:46 PM UTC+1, TimV wrote: Inside hieradata, I have a simple common.yaml file, and in that file I have: --- testmsg : 'Tim was here' ntp::restrict : false, ntp::autoupdate : true, ntp::enable : false, ntp::servers : [ ntp.example.org iburst,

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

2014-05-31 Thread Sans
Good catch Ellison; I haven't noticed that but nope, nothing unusual from facter on the affected node. Now running puppet agent -tv with certificate cleared from both master and agent yields these: notice: Starting Puppet master version 2.7.23 info: access[/certificate_request]:

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

2014-05-30 Thread Sans
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 error for one of those nodes

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

2014-05-30 Thread Sans
On Friday, May 30, 2014 11:13:51 PM UTC+1, Henrik Lindberg wrote: Ok, then webrick is not the cause of your problem. Run with --trace set to get a ruby stack trace. That will help to find what is causing the problem. - henrik Yes, that was the output from --trace and that's why I

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

2014-05-29 Thread Sans
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 on node warning: Not using cache on

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

2014-05-29 Thread Sans
Thanks Felix for the heads up. Sorry for the long post. That's all I get using --trace option but I still can't figure out what's going wrong. notice: Starting Puppet master version 2.7.23 info: access[^/catalog/([^/]+)$]: allowing 'method' find info: access[^/catalog/([^/]+)$]: allowing $1

[Puppet Users] Re: Hiera question: Nested hash

2014-05-06 Thread Sans
Hi John, I haven't use create_resources() before, so following the puppetlab docs. After having the data structure in my default.yaml, I have this in the nodes.pp: $hr_mon_base_pkgs = hiera_hash('rpm_mon_base_pack', undef) and then in my utils.pp, I have this: class monitoring::mon-utils {

[Puppet Users] Re: Hiera question: Nested hash

2014-05-06 Thread Sans
On Tuesday, May 6, 2014 3:36:13 PM UTC+1, jcbollinger wrote: Using hiera_array() does ensure that the value retrieved is an array, but it's not at all what you want for this job or for either data structure. In this case, the returned array will contain one element -- the same hash

[Puppet Users] Re: Hiera question: Nested hash

2014-05-05 Thread Sans
Thanks John for showing me a way to do it. I haven't tried that yet but meanwhile, I was also trying the define type but different way. Do you think this is a better data structure? rpm_mon_base_pack: base-pkg1: rep: mon-repo-test rpm: rpm-mon-ntp ver: latest

[Puppet Users] Hiera question: Nested hash

2014-05-02 Thread Sans
In my module, I have something like this to installed some base packages: package { 'rpm-mon-ntp': ensure = latest, require = Yumrepo[ mon-repo-test ]; 'rpm-mon-utils': ensure = installed, require = Yumrepo[ mon-utils-test ]; 'rpm-mon-patch':

[Puppet Users] Re: Use the virtual resources and hiera to create the environent specific group os users

2014-05-01 Thread Sans
Thanks guys for the heads up! I didn't get time to try any of those, which I'll do tonight and report back. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Puppet Users] Use the virtual resources and hiera to create the environent specific group os users

2014-04-30 Thread Sans
Hi all, I have users module, which I don't control but include in my manifest to setup user(s) on my system. This is something I have in one of the .pp files: class users::productupport { @group { 'productsupport': gid = '1553', } @produser { 'jake_s': user

[Puppet Users] How to apply a set of configurations to a specific host group?

2014-04-23 Thread Sans
Hi all, For some historical reason, our hosts are not systematically named nor matches with the service(s) it runs and I don't see it's changing any time soon. So using a Regex in the nodename is not really an option for me. I have four environments - Dev, Int, Stage and Live - and I've just

Re: [Puppet Users] How to apply a set of configurations to a specific host group?

2014-04-23 Thread Sans
Thanks Jose! That trick worked (I've actually used that thing before) but I was wondering if there is a way to do it properly, like creating a host-group or something like that. Best! On Wednesday, April 23, 2014 12:25:09 PM UTC+1, Jose Luis Ledesma wrote: Hi, You can use a default

Re: [Puppet Users] How to apply a set of configurations to a specific host group?

2014-04-23 Thread Sans
Do you have any example(s) handy, Neil? I'm trying in google as well. Top of that, I never used SQL with hiera before. On Wednesday, April 23, 2014 10:03:24 PM UTC+1, Neil - Puppet List wrote: Hello I think you'd probably be best served by using a sql backend to hiera. this would allow

[Puppet Users] Re: Facts in ERB Template not working

2014-04-22 Thread Sans
On Tuesday, April 22, 2014 2:35:05 PM UTC+1, jcbollinger wrote: That is the current recommendation, but it is not a requirement. Bare variable names work, too. You sure it's just a recommendation? IIRC, it doesn't work with Ruby v1.9.x. But that's definitely not the actual problem

[Puppet Users] Re: Hiera arry into ERB template

2014-04-17 Thread Sans
Thanks guys for the explanation; worked just fine. Is there any other good hiera documentation apart from the one in Puppetlab doc? -San On Wednesday, April 16, 2014 6:59:27 PM UTC+1, jcbollinger wrote: On Wednesday, April 16, 2014 11:31:53 AM UTC-5, Sans wrote: Hi there, Trying

[Puppet Users] Hiera arry into ERB template

2014-04-16 Thread Sans
Hi there, Trying to figure out how to use hiera-array in my template. So, this is what I have in .yaml file: my_coll_list: - mon502.local - mon522.local and in my nodes.pp, I have this: $my_colloctors = hiera_array('my_coll_list') then in one of my ERB templates, I using that

[Puppet Users] agent hangs at: Caching certificate_revocation_list for ca

2013-11-18 Thread Sans
Dear all, I just upgraded the OS of my PuppetMaster from Debian Squeeze to Wheezy (on AWS/EC2) and since then all the clients hangs at: Info: Caching certificate_revocation_list for ca and then eventually fails with Timeout error. I think, it did work until I rebooted the Master. In

[Puppet Users] Re: how to pass the value to custom function?

2013-10-23 Thread Sans
Thanks John! That fixed problem. I believe, in that, case symbol should be used over string in a hash? Cheers!! On Tuesday, October 22, 2013 2:12:17 PM UTC+1, jcbollinger wrote: Your hash keys are symbols, whereas argument 0 to the function is a string. 'linux' != :linux. Try adding

[Puppet Users] how to pass the value to custom function?

2013-10-21 Thread Sans
Dear all, I'm trying this thing for a while but can't figure out what am I doing wrong. Here is my sample function (which is similar to the original one, except for the hash, which is generated dynamically in the original one): module Puppet::Parser::Functions

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-18 Thread Sans
Thanks John! That's it! feel myself like the biggest stupid in the world! Thanks every one for the help. It's working just fine now. Cheers!! On Friday, October 18, 2013 2:24:29 PM UTC+1, jcbollinger wrote: *Be sure to restart your master after modifying any custom functions. If you

[Puppet Users] Re: installing a package nmap on ubuntu

2013-10-18 Thread Sans
What you get running this: /usr/bin/apt-get -y -o DPkg::Options::=--force-confold install nmap on the agent? Cheers!! On Friday, October 18, 2013 8:30:37 AM UTC+1, kampy wrote: Hi, i am new to puppet please help me how to resolve this issue. below is my script class nmap {

Re: [Puppet Users] Nagios Puppet

2013-10-17 Thread Sans
Hi steve, So, you have all the services defined statically on the Nagios server? That setup only works, I think, if you install your Nagios server at the very end of your deployment process and all the clients are up and ready before the server. If you do a parallel deployment, then there is a

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-17 Thread Sans
It's strange: whatever I do I can't go past these error. Either it cannot recognize the function or fails with single array error. Still don't understand what I'm missing. Cheers!! On Thursday, October 17, 2013 1:34:26 AM UTC+1, Sans wrote: Not sure if it's important: the line number

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
Hi Cristian, Thanks for the code. gos[:mac] is the right thing to do (as we defined: gos = {}); I think I g_C was a typo in my example script somewhere down the line). One related question: as I read that the name of the file must be the same as the name of the function, then I suppose I

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
I just modified your code a little bit and created two function out of that: *# am_running_oss_hash.rb* module Puppet::Parser::Functions newfunction(:am_running_oss_hash, :type = :rvalue ) do |args| inFile = args[0] gos = {} if File.exist?(inFile)

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
Not sure if it's important: the line number in the error message points to the line in the .pp file where $h = am_running_oss() is defines. If I change that line with am_running_oss_hash('/tmp/OSs.txt') it works just fine. Cheers!! On Wednesday, October 16, 2013 10:37:19 PM UTC+1, Cristian

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-15 Thread Sans
Yes, the file is only on the master (and not exactly maintained by the Puppet but the provisioning framework) and it looks something like this: Slackware, Linux, i-num=1 Jaguar, MacX, i-num=6 Chicago, this_Win, i-num=2 Daytona, an_other_Win, i-num=7 RedHat, Linux, i-num=5 Lion, MacY,

[Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Dear all, I have a custom fact, that reads a file and then generate the values dynamically based on the file content. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/

[Puppet Users] exporting custom facts to the puppet agents

2013-10-13 Thread Sans
Dear all, I have a custom fact, that reads a file and then generate the values dynamically based on the file content. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
/admin/OSs.txt)is there for the .rb file to read it, hence the fact returns 'undefined'as well. -San On Sunday, October 13, 2013 11:18:46 AM UTC+1, Martin Alfke wrote: Hi, On 13.10.2013, at 10:57, Sans r.sant...@gmail.com javascript: wrote: [...] The file is on the PuppetMaster

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
.well, unless I'm missing something here. -Santanu On Sunday, October 13, 2013 11:37:19 AM UTC+1, Sans wrote: Hi Martin, That doesn't actually work: I thought exactly the same in the beginning and already have the pluginsync enabled. I think, the reason being, the fact

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
happens way before anything else, the file is not copied prior to the custom fact. So, I need to run puppet twice to get the custom fact working on a freshly installed agent. -San On Sunday, October 13, 2013 11:39:22 AM UTC+1, Sans wrote: .well, unless I'm missing something here. -Santanu

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Hi Wolf, yes, the custom fact itself is working just fine, so that's not a prob at all. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/ parts =

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Hi Cristian, That sounds a workable solution. Do you have any example handy; I've never used that before. -San On Sunday, October 13, 2013 9:04:09 PM UTC+1, Cristian Falcas wrote: Why not make your fact a function? This way it will only run on the master and you will use a return

[Puppet Users] Re: Puppet fails to install package, whilst it's okay to do manually

2013-10-11 Thread Sans
True! I didn't show that it actually installed from the command line but it does/did. After a bit digging, I found a rather strange issue - that was the very first installation just after spinning up the instance and puppet needed an *apt-get update* first to carry-on with installation, whilst

[Puppet Users] Puppet fails to install package, whilst it's okay to do manually

2013-10-10 Thread Sans
Dear all, I'm seeing this strange thing: When I run *puppet agent -td* on the node (Nagios, in this example case), puppet fails to install Nagios3 (on Debian) with this: Debug: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n nagios3' Debug: Executing

Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2013-10-06 Thread Sans
Hi there, Just to report that I still see the same issue: Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Error: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2013-10-06 Thread Sans
Hi there, Just to report that I still see the same issue: Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Error: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

Re: [Puppet Users] Puppet is always trying 'service start' instead of 'restart' - how to force restart?

2013-10-06 Thread Sans
Thanks Trevor! Although I was wondering about it but never thought that's actually causing this problem. On Debian/Ubuntu, the name of the init.d script (ganglia-monitor) is different than the daemon (gmond). Fixed now. Cheers!! -- You received this message because you are subscribed to the

[Puppet Users] Puppet is always trying 'service start' instead of 'restart' - how to force restart?

2013-10-05 Thread Sans
Dear all, As stated in the title, I have a module for ganglia gmond, where puppet is always doing '*/etc/init.d/ganglia-monitor start*' instead of '*restart*' whenever a 'refresh' is triggered for the service. This is what I have in my module: file { 'gmond_conf': name=

[Puppet Users] How to iterate over a string to construct nagios_service check as exported resource?

2013-03-14 Thread Sans
Dear all, I wrote a custom fact, which returns a comma separated list of addr:port, like this: sb_intl_conn = sbcms-t:22,sbsql05-wvuk-inst5:1434,sborc07-uk-t:1533,..,..,.. The number of elements in the string varies from node to node. I need to do a Nagios tcp-port-check on each

Re: [Puppet Users] autometically create nagios_hostgroup only when a member of a group comes up

2013-02-20 Thread Sans
Hi Pete, how you doing? You will get duplication if you declare a nagioshost_group with the same name on more than one node... I think you may be missing the point of nagios_hostgroup. It is for declaring a hostgroup in nagios not setting the nagios hostgroup for a node. Yes, I know that

  1   2   3   >