Re: [Puppet Users] Trigger apt-get update if packages are to be installed

2017-07-07 Thread Klavs Klavsen
Did you ever find a good solution to this? found stuff like this: 
https://blog.bluemalkin.net/puppet-trick-running-apt-get-update-only-when-needed/
 
- but thats really ugly

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52bf65e9-5458-4053-95e5-842eaebe7203%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: grafana

2016-12-09 Thread Klavs Klavsen
We do that.. look at http://docs.grafana.org/reference/scripting/

You can simply write a scripted dashboard and have your javascript check 
f.ex. for the existence of a mysql counter on the relevant host.. and then 
draw the graphs for "mysql" if the counters are there - and so on for all 
other type of graphs you want.

We then link from our monitoring system to the scripted dashboard - with 
hostname as argument - that way we always have a direct link from an alert, 
to all relevant graphs for a host.

Den torsdag den 8. december 2016 kl. 10.06.08 UTC+1 skrev Arkadi Colson:
>
> Hi 
>
> Somebody managed to implement Collectd - InfluxDB - Grafana monitoring 
> in an automated way? Collectd is not a problem but how to automate 
> graphs addition in Grafana for new hosts based on roles? 
>
> Thx! 
> Arkadi 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6a859a0e-a1c2-4954-ab57-1340568ab854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: New to Puppet :wanted more information of VM provisioning in puppet

2016-11-22 Thread Klavs Klavsen
lxd module for puppet can provision lxc 'vm's - and puppet-virt module can 
provision kvm's.

But normally puppets place in the footchain - is NOT provisioning.. there 
are much better tools for this (razor etc.) - which then hands over OS 
system configuration to 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 an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ec0061c8-9463-4fa0-9405-4f17543de440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Options for notifying external services in case of changing exported resources.

2016-03-22 Thread Klavs Klavsen
I configure monitoring by letting puppet create exported resources on all 
hosts (where my rules then figure out what to monitor).. and then I simply 
pull those resources on the monitor servers - which results in config files 
for the things to monitor. Works beautifully with nagios/icinga and other 
text-based configs.

if I were to interface with something stupid (like stuff needing 
guy/rest-api to update config).. I'd still make puppet write config files.. 
perhaps in json format - and then simply catch puppet return code in script 
running puppet on the "config server that pulls the exported resources".. 
and post those new json files (filestamp tells it like it is ;) - to the 
config endpoint.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/24d44f87-f960-414d-89f4-cdaef2dd52d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] user and service interdependencies

2015-12-17 Thread Klavs Klavsen
Someone should really create a ticket with a suggestion to fix it (with 
some examples of what this new option should fix) - and share it here - so 
everyone can watch the ticket and chime in (it's open source.. remember ;)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0ad917d1-60d6-4009-be31-8b3354b60349%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: JBOSS module installation and Configuration through puppet

2015-10-29 Thread Klavs Klavsen
I just had to that.. I simply landed on creating an rpm - that packaged up 
the files.. so I could install jboss using yum.. much preferrable (and 
since I'm using licensed edition - puppet can't download it by itself 
anyways.. unless I placed it somewhere locally ofcourse).

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52fef488-5cef-4081-8d41-3c162ee58927%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: counting failures, success, and so on - giving wrong counts

2015-05-19 Thread Klavs Klavsen
I found a solution. adding --distinct (incl. start and end time, set to 
yesterday and today) - it works.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6d01f704-5067-4651-8a26-49200935ec97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] counting failures, success, and so on - giving wrong counts

2015-05-18 Thread Klavs Klavsen
I'm trying to let puppetdb query the result of a puppet run, and then fetch 
the numbers of failures, successes, changes etc.. using this:
curl -G 'http://localhost:8080/v3/aggregate-event-counts' --data-urlencode 
'query=[=, certname, myhost.fqdn]'  --data-urlencode 
'summarize-by=containing-class'

This seems fine on some hosts, but on others it returns 'odd' values, like 
this:
{
  successes : 10,
  failures : 26,
  noops : 4,
  skips : 23,
  total : 36
}

Even though the puppet run says on the same machine says:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Loading facts
Warning: The package type's allow_virtual parameter will be changing its 
default value from false to true in a future release. If you do not want to 
allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Caching catalog for myhost.fqdn
Info: Applying configuration version '1431953336'
Notice: 
/Stage[main]/Selinux::Config/Exec[change-selinux-status-to-disabled]/returns: 
executed successfully
Notice: /Stage[main]/Logstash/Service[logstash]/ensure: ensure changed 
'stopped' to 'running'
Info: /Stage[main]/Logstash/Service[logstash]: Unscheduling refresh on 
Service[logstash]
Notice: Finished catalog run in 9.96 seconds

How do I proceed, to figure out why those numbers are so warped ?

p.s. I'm using puppetdb-2.3.3 and puppet-3.7.4

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/17d97e78-7a80-461c-8a0f-cadd2bca73e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: export concat::fragments does not work

2014-10-06 Thread Klavs Klavsen
You must define the concat for /myfile as well on all servers.

I've switched to file_concat for these things, and it helped me - and you 
might not need to define it with that module.. give it a whirl.

concat module has several deficiencies which all seemed to be very well 
resolved by the file_concat module (and you might be able to make that work 
without - which also has the advantage, that it does not copy files and 
some scripts to /tmp for it to work - and hence a --noop run can actually 
give you a diff, instead of failing as it does with concat module.

Den mandag den 6. oktober 2014 13.14.39 UTC+2 skrev Vincent Miszczak:

 Hello,
 I need to export concat::fragment on some nodes and gather the results on 
 some other.

 To create the export I do something like :
 @@concat::fragment{/myfile-$fqdn:
target=/myfile
 }

 but on the export node I get : 
 Invalid relationship [...] because Exec[concat_/myfile] doesn't seem to be 
 in the catalog.

 I don't want/need to declare a concat for /myfile, because I would need 
 the required filesystem layout for the final file. I just want to export 
 fragments.

 Am I missing something ?




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/dad548e5-34c4-40f6-8c3d-21114d03bcfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: how to require a md5sum before installing?

2014-02-16 Thread Klavs Klavsen
My solution to that, has been to use a packaging system. RPM etc. all check 
md5sum (and PGP check against upstream signature) - so I insist on rolling 
everything binary, on as packages, and use only 1 packaging system per host 
(ie. gems etc. get repackaged to rpm, deb or whatever).

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/120f14fe-e19a-41bb-826a-15e7ead315e6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] What is the best replacement for Puppet Dashboard ?

2014-01-30 Thread Klavs Klavsen
I use puppetboard too - it's really great, and much lighter on the 
database. A big improvement on puppet-dashboard.

Only one issue remains, that means I must keep my puppet-dashboard.. 
There's a bug in the puppetdb-terminus - so nodes which manifest fails 
compilation fails - does NOT get a report send to puppetboard, so you can't 
catch failing compilation failures :(

Odlly enough, puppet does send the http reports when there's a failed 
compilation - so puppet-dashboard knows about them.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/008d0d13-10f1-496c-8589-a451df72a0b1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Choo choo here comes the FOSDEM train

2014-01-19 Thread Klavs Klavsen
I'll be there as well.. saturday and sunday only though. (FiXion on irc)

see http://blog.klavsen.info/ for a larger picture :)  

looking forward to seeing you there.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e6c4f157-e59a-427b-9135-c1229a9314b2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Upgrading a .msi package through Puppet

2014-01-14 Thread Klavs Klavsen
I use:
if ( $puppetversion != 3.3.1 ) {
  package { Puppet 3.3.1:
 source =  software01\\autorepo\$\\Puppet\\puppet-3.3.1.msi,
 install_options = [ '/quiet', 
'/norestart','PUPPET_MASTER_SERVER=puppet.example.dk']
  }
}

to ensure a specific version on all windows hosts.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52b6a517-3722-4930-83a4-fe740e7dea89%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] only subclasses can modify ?

2014-01-07 Thread Klavs Klavsen
I'm trying to modify certain users, created with by calling the define 
users::local.

I tried to do it, by calling users::local::modify - but then puppet 
complains that only subclasses may modify.. :(

What am I doing wrong here?

Code:

define users::local 
($uid,$gid,$realname,$groups=[],$pass='',$sshkey=,$shell=/bin/bash,$home=/home/$title)
 
{
user { $title:
ensure  =  present,
uid =  $uid,
gid =  $gid,
groups  =  $groups,
shell   =  $shell,
home=  $home,
comment =  $realname,
password = $pass ? {
'' = undef,
default = $pass
},
managehome =   true,
}

if ( $sshkey !=  ) {
 ssh_authorized_key { $title:
 ensure  =  present,
 type=  dsa,
 key =  $sshkey,
 user=  $title,
 require =  User[$title],
 name=  $title,
 }
}
}

define users::local::modify 
($uid='',$gid='',$realname='',$groups=[],$pass='',$sshkey=,$shell=/bin/bash,$home=/home/$title)
 
{
  if (  ! empty($groups) ) {
User[$title] { groups = $groups }
  }
}

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/77b419a4-e8da-42e8-921e-72156b1816ba%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: only subclasses can modify ?

2014-01-07 Thread Klavs Klavsen
but defines can't inherit it seems. The docs are a little vague, but they 
seem to indicate that only classes can inherit ( 
http://docs.puppetlabs.com/puppet/2.7/reference/lang_classes.html#inheritance 
)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/50b8d6a0-f577-4843-a699-ba8dc83338d0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] only subclasses can modify ?

2014-01-07 Thread Klavs Klavsen
It seems defines can't inherit.. the docs are a bit vague, but they seem to 
indicate that only classes can inherit : 
http://docs.puppetlabs.com/puppet/2.7/reference/lang_classes.html#inheritance


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cc5c88a8-c437-4b85-a20b-a4b945457275%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: VMware and open source puppet

2013-12-05 Thread Klavs Klavsen
I believe vagrant has gotten vmware support - so one can use it to disperse 
vms in vmware esx servers.

It's not a free extension though: http://www.vagrantup.com/vmware#learn-more

But it's fairly simple powershell scripting to create vms - so one could 
rather easily write a powershell script, which takes arguments from 
command-line-  and then create vms with exec.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b757c553-2e69-4fb4-8946-cb3c5d094812%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet and Windows ACLs (Access Control Lists)

2013-10-28 Thread Klavs Klavsen


Den fredag den 25. oktober 2013 22.10.40 UTC+2 skrev Rob Reynolds:

 tl;dr: Windows manages permissions in a way that doesn't always translate 
 well to mode. We're putting together a solution for this. Jump in the 
 discussion.


 I wanted to get this conversation started. We've put a lot of thought into 
 how the model should look and focused on ease of use up to more advanced 
 scenarios.

 However I don't feel that what we have is complete. If you are familiar 
 with Windows, we'd love to get your feedback. If you are not familiar with 
 Windows, we'd still love to get your feedback.

 A couple of notes to start it off:

 1. This is currently planned to be a module on the forge.

  

2. We have some changes to make to core puppet to better enable handing 
 windows permissions (changes around how mode is applied on Windows now when 
 not explicitly specified).


IMHO it should be possible to leave out mode (especially when ones declare 
an acl instead) - and puppet should NOT care about mode (as in shouldn't 
try to set it as it does not, and breaks windows permissions).

 

 3. We tried to map somewhat close to the way Windows ACLs/DACLs/ACEs work.


 

 4. We've also attempted to leave room for future expansion or application 
 on POSIX systems. Note: this is not a primary goal, so unless there is a 
 design consideration on the model, it's probably not something we will 
 approach with this current effort.


acl should most definetely be applicable for any unix filesystem mounted 
with ACL support :) 
 

 The format could look something like the following:

 acl { 'c:/windows/temp/tempfile.txt':
   ensure = present,
   permissions = {
 'Administrators' = ['full']
 'bob' = ['mwrx'],
 'SomeDomain\Lisa' = [x1000,'allow','inherit','one_level'],
 'S-5-1-18' = ['wrx','deny','inherit_objects_only','inherit_only']
   },
 }

 acl { 'c:/windows/temp/locked_dir':
   ensure = exact,


That one throws me.. ensure exact? I would expect 'exact' to be the same as 
'present' (which in thise case is kinda odd wording- but so is exact.. who 
would want puppet to almost ensure something?


   permissions = {
 'Administrators' = ['full']
   },
 }

 Before you have an opportunity to look at the proposal and comment on 
 specifics, how self-documenting is the above model?  What would you add or 
 remove?



-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: External Facts on Windows with Powershell

2013-10-15 Thread Klavs Klavsen
Ticket updated :)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: External Facts on Windows with Powershell

2013-10-14 Thread Klavs Klavsen
Also of note.. facts.d support is broken in windows 2003 :( (and it breaks 
puppet - so it won't even run) - see 
http://projects.puppetlabs.com/issues/22622

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Rootless Puppet

2013-10-11 Thread Klavs Klavsen
I know of several who have managed servers, but want to use Puppet to roll 
manage the applications they install, and whatelse they have been allowed 
to manage - but that will never be able to run puppet as root, since the OS 
is not their responsibility.

Also - some of those, the managers of the server use puppet (as root) to 
set them up - but again - they can't share puppet repo.. so it would be 
preferrable to be able to install root elsewhere (they build their own 
patched version of puppet, to make it support installing under /opt - not 
something puppet supports very well currently). They are also using puppet 
on a lot of diff. unix OS'es - so they have to compile it for several 
themselves, and since they want thing uniform (and none-intrusive) - they 
choose to install under /opt on all.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Rootless Puppet

2013-10-11 Thread Klavs Klavsen


Den fredag den 11. oktober 2013 14.12.32 UTC+2 skrev Klavs Klavsen:

 so it would be preferrable to be able to install root elsewhere 


Dooh - to install puppet elsewhere :) (ie. under /opt/puppet f.ex.) 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] LogStash Book released

2013-10-09 Thread Klavs Klavsen
indepth kibana.. well wouldn't that mostly be elasticsearch in depth you'd 
need? and Kibana is such a moving target, that it would probably have 
changed majorly, before a book came out :)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet dashboard stuck pending jobs - MySql Error: Incorrect string value

2013-10-07 Thread Klavs Klavsen
I've seen similar errors, and I found it easier to simply delete the 
reports where this happened.. unfortunately puppet-dashboard is not 
entirely bugfree, and unmaintained.. :(

I'm hoping to replace puppet dashboard with 
https://github.com/nedap/puppetboard - but haven't had time to work on that 
:)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: RFC: Default File Permissions

2013-09-19 Thread Klavs Klavsen
This would be a GREAT benefit, and I for one, would definetely make it my 
File default :)

source_permissions is a fine name for it.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb - getting a list of specific facts for specific hosts?

2013-09-04 Thread Klavs Klavsen
Den tirsdag den 3. september 2013 20.09.19 UTC+2 skrev Ken Barber:

 Is it acceptable to do the search based on 'certname'? ie: 

 curl -G 'http://localhost:8080/v2/facts' --data-urlencode 
 'query=[and,[~,certname,puppetdb?],[or,[=,name,ipaddress],[=,name,hostname]]]'
  



 Thank you - that worked beautifully :)

Only detail - is that it shows 2 results for each host - one for each 
fact being retrieved.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppetdb - getting a list of specific facts for specific hosts?

2013-09-02 Thread Klavs Klavsen
I'm trying to query puppetdb for a list of hosts maching a certain regex 
(on hostname) and only returns 2 facts (ipaddress and hostname)

I'm trying to follow:
http://docs.puppetlabs.com/puppetdb/latest/api/query/tutorial.html

and I'm not even quite sure, wether or not, I should use a facts or a 
nodes, or a resources query ?

I get some of the queries to return just fine.. f.ex. I can query on nodes:
curl -X GET -H 'Accept: application/json' http://localhost:8080/v2/nodes 
--data-urlencode 'query=[~, [fact, hostname], webserver]'

But I can't figure out how I can make that query, return 1 extra fact 
(ipaddress).. ?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb - getting a list of specific facts for specific hosts?

2013-09-02 Thread Klavs Klavsen
I also tried https://github.com/dalen/puppet-puppetdbquery - but that 
didn't really get me any closer :(

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb - getting a list of specific facts for specific hosts?

2013-09-02 Thread Klavs Klavsen
This gives me the ipaddress (and hostname).. now to figure out how to 
filter on hostname regex..

'query=[=, name, ipaddress]'

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppet-3.2.2 runs fine - but doesn't work. 2.7.22 works fine.

2013-08-14 Thread Klavs Klavsen
I switched to running webbrick instead of passenger - and it runs perfectly.

I'll try to go through my passenger setup on other puppetmasters that run 
3.x - and see if I can find any differences.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] how to fix: Warning: calling Plugins.search with empty module path

2013-08-14 Thread Klavs Klavsen
Just setup Puppet 3.2.2 - with debug enabled in passenger, it complains 
about this:
Warning: calling Plugins.search with empty module path

and it does seem to not find any modules, nor plugins.

how do I fix that warning?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-07 Thread Klavs Klavsen
It seems very cool. Thank you for sharing.

One thing that I would be missing, before being able to switch (as gathered 
from screenshots - I haven't tested it yet :) - is the overview of failed, 
unreported and unresponsive hosts.
Also - there would need to be a way to query this - just as I currently do 
from puppet-dashboard (for my nagios monitoring) - so that I can alert when 
I started getting failed runs etc.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet-3.2.2 server not working - my 2.7.22 does

2013-08-07 Thread Klavs Klavsen
Hi,

I've setup a new puppet 3.2.2 server - next to my current 2.7.22 server.

When I connect with a client against it (changed puppet.conf to use the new 
server), then it removes facts and all (and runs no rules) - but it doesn't 
complain anywhere - not on the new puppetmaster either :(

I'm hoping you can give me some ideas, as how to debug this further. 

I'm running Passenger btw (on both servers).

Output from client run is this:
# puppet agent -t 
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet]/ensure: removed
Notice: /File[/var/lib/puppet/lib/provider]/ensure: removed
Notice: /File[/var/lib/puppet/lib/facter]/ensure: removed
Notice: /File[/var/lib/puppet/lib/type]/ensure: removed
Info: Caching catalog for login01.example.dk
Info: Applying configuration version '1375874403'

Puppet.conf is copied from my existing master:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
modulepath = /etc/puppet/modules
pluginsync = true
dns_alt_names = puppet,puppet.example.dk,puppetmaster.example.dk

[user]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
server = puppetmaster.example.dk
ca = false
ca_server = puppetmaster-01.example.dk
report = true
runinterval = 1800
[master]
certname=puppetmaster.example.dk
ca_server=puppetmaster-01.example.dk
templatedir=/var/lib/puppet/templates
reports = store, http
#reports = http
 reporturl = http://localhost:3000/reports/upload
storeconfigs = true
storeconfigs_backend = puppetdb
facts_terminus = rest
inventory_server = localhost
inventory_port = 8081
#ENC
node_terminus = exec
external_nodes = /usr/local/bin/puppet_node_classifier_enc.sh
modulepath = /home/$environment/puppet/modules/
manifest = /home/$environment/puppet/manifests/site.pp

[production]
modulepath = /etc/puppet/modules
manifest = /etc/puppet/manifests/site.pp

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Add a public ssh key form node A to authorized keys on node B

2013-08-06 Thread Klavs Klavsen
What I did, was to simply write my own fact, that reads the id_rsa.pub 
file - and then in the manifest, I simply check if that fact is !=  - and 
if so - do @@ssh_authorized_key.. with the public key - and collect that 
where I want it.

I have several webservers - which all need to have a key (I simply do an 
exec, with creates defined - so it's only run if it's not already been 
done) and then have the public part on one central server.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: is there any way to see what are the resources exported by a node?

2013-07-25 Thread Klavs Klavsen


 would you mind sharing your solution - for the benefit of others who may 
 find your question by googleing - and can't really find the answer in the 
 irc conversation you had? :)



-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Decomission node process (puppet / puppetdb / dashboard)

2013-07-25 Thread Klavs Klavsen


 that job just removes reports for hosts - it does't remove the actual 
 hosts.


You need to pick the node in puppet-dashboard webinterface - and choose 
delete (upper right corner) 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: How do I set global noop?

2013-07-25 Thread Klavs Klavsen


 well - perhaps you can put noop = true

or something in puppet.conf on the clients ? 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Perform action when exported resources change

2013-07-23 Thread Klavs Klavsen


Den mandag den 22. juli 2013 08.58.32 UTC+2 skrev George Brown:

 Hi Sneha,

 This is for a GPFS (IBM parallel file system) cluster. When a new client 
 is added it needs to be added by an node that is already part of the 
 cluster. I'm trying to automate this through puppet

 E.g. node80 has just been provisioned

 After installing the client packages I need to add the node from a server 
 already in the cluster by running the following two commands

 mmaddnode -N node80
 mmchlicense client --accept -N node80

 Obviously I only want to have this exec run when a new host is added but I 
 also only want it to execute for the newly added host (I don’t want it to 
 run though nodes01-79 also).


Perhaps you could do an @@exec.. with a creates.. question is where it 
actually runs the creates check (I'd assume it to be run where it is 
collected).
That only depends on the commands above, actually creating a file 
somewhere, so you can check for the existence of that file. Otherwise you 
could do an unless instead (a bit more expensive and troublesome though) 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: dashboard groups

2013-07-15 Thread Klavs Klavsen


Den onsdag den 10. juli 2013 12.32.07 UTC+2 skrev Salty Old Cowdawg:

 Is there a global variable (or variables) that get set when a group gets 
 defined in dashboard?  What I'm trying to do is in a template have a 
 conditional such that if a host is in one group do this and if not in 
 that group do that. 

 Well - I use groups in a similar way. I use NIS netgroups (managed by our 
OpenLDAP cluster), and I then simply wrote a small ENC script, which sets a 
variable called $netgroups - which is simply a list of netgroups the 
relevant host is a member of. (ENC scripts are given the hostname.fqdn as a 
parameter - and can then return yaml with classes or variables to be 
defined).

I then use IN in manifests and netgroups.include? in my templates.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] multiple masters and CA's - what's the issue?

2013-07-10 Thread Klavs Klavsen
Hi,

I've just setup a new secondary master - following 
http://docs.puppetlabs.com/guides/scaling_multiple_masters.html

Nice docu. Much easier than when I first did it (with 0.24 :)

One thing I'm wondering about, is why there can be ONLY 1 CA ?

is it because of the CRL ?

I was thinking of copying the ssl/ca folder to the other masters.. (with a 
regular sync of CRL) - so it should be a simple matter of appointing 
another CA - if the CA goes down - instead of needing to recover that 
puppetmaster, before I can sign any new servers.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] how do you update packages on windows?

2013-07-04 Thread Klavs Klavsen
Hi guys,

Currently the windows package provider does not support versions (like 
ensure = 1.2.3).

Even though most packages set a DisplayVersion key in the registry - so the 
version is often available.

Now I need to upgrade my puppet clients from v3.1.1 to v3.2.3-rc1 (to get 
facts.d support on windows) - and I was wondering if any of you had a 
suggestion as to how to handle it, until windows package provider supports 
versions ?

I was thinking I'd have to create a fact puppetclientversion or something 
(which I'd need to figure out how to get in ruby) - and then do an exec of 
msiexec (I can't use package - since it can only ensure = installed - and 
it's already installed).

What do you guys do?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Need help with python msi install on windows

2013-05-22 Thread Klavs Klavsen
Try: 

class python::install {
 package { 'python':
 ensure  = installed,
 source  = example.com
 \\software\\python\\python-2.7.3.amd64.msi,
 install_options = [ { 'INSTALLDIR' = 'C:\python27' }, { 
 'ALLUSERS' = '1' } ],
 }
 }


p.s. with puppet 3 - provider should be windows - and should be so pr. 
default. 

notice that it HAS to be a valid UNC path - otherwise you could try to put 
a file resource - to throw the msi to c:\temp f.ex. - and use that as UNC 
path to package.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: PuppetDB database tunning

2013-05-22 Thread Klavs Klavsen
http://docs.puppetlabs.com/puppetdb/1.3/maintain_and_tune.html

Den onsdag den 22. maj 2013 09.56.36 UTC+2 skrev Heriyanto:

 Hi,

 I've been use puppetdb about 6 months ago, and now the database more than 
 6gigs
 Is that any way to recycle database? the data on database more than 
 30days
 removed, I try to find is that any option in puppetDB so far, or we need 
 to tune from database side(i use postgresql)?

 Thanks for any comment.

 Best regards,
 Heriyanto


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Installing packages on windows - fail :(

2013-05-14 Thread Klavs Klavsen
I switched to the winxp edition - and sflow now installs perfectly.

I edited path to NSCP - to be EXACTLY the same as I use for sflow agent msi 
- and now it works too - atleast on win2003/x86 machines. Haven't had time 
to test on win2008.

One odd thing - I'musing a path like this - which works:
my-software01\\autorepo\$\\NSCP-0.4.0.183-Win32.msi

However, this path works fine NSCP - the exact same - for the sflow agent 
ONLY works for windows servers on same Domain as the my-software01 machine. 
The machine on this other domain - can easily open 
\\my-software01\autorepo$ in a file explorer on the machine - but msieexec 
says it can't find the network path.. 

It seems a pretty fragile package distribution mechanism :(

Thank you for your help - if you have any ideas as to this multi-domain 
thing - which works for one msi - and NOT for the other msi.. pls. fire 
away :)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] define and exported resources - giving wrong template content

2013-05-08 Thread Klavs Klavsen
Hi,

I have an odd problem - I have a define, as an exported resource. when 
puppet creates them on the central gdash host - it creates them with the 
correct (client) hostname (f.ex. cat 
/var/www/gdash/graph_templates/dashboards/hosts/p-web01/dash.yaml) - but 
the content has the central gdash hostname in them instead (of f.ex. 
p-web01 etc.).

I do the same with nagios config - and there it works fine (only diff I can 
see, is that I do export the file resource directly (with a tag), instead 
of doing it in a define).

##definition - run on hosts
  @@gdash::hostgraphs { ${::hostname}: }

##profile on gdash server
  Gdash::Hostgraphs | | { }

##gdash::hostgraphs

define gdash::hostgraphs () {
  $tplpath = /var/www/gdash/graph_templates/dashboards
  $hostpath = $tplpath/hosts/$name
  #file { $tplpath/hosts: ensure = directory }
  file { $tplpath/hosts/$name: ensure = directory, require = 
File[$tplpath/hosts] }
  #$graphs = [  'dash.yaml', 'cpu.graph', 'io.graph', 'iops.graph', 
'load.graph', 'memory.graph', 'nettraf.graph', 'sockets.graph']
  file { $hostpath/dash.yaml: content = template('gdash/dash.yaml') }
  file { $hostpath/cpu.graph: content = template('gdash/cpu.graph') }
  file { $hostpath/io.graph: content = template('gdash/io.graph') }
  file { $hostpath/iops.graph: content = template('gdash/iops.graph') }
  file { $hostpath/load.graph: content = template('gdash/load.graph') }
  file { $hostpath/memory.graph: content = 
template('gdash/memory.graph') }
  file { $hostpath/nettraf.graph: content = 
template('gdash/nettraf.graph') }
  file { $hostpath/sockets.graph: content = 
template('gdash/sockets.graph') }
}

The templates all look kinda like this (modules/gdash/templates/dash.yaml):
:name: %= hostname %
:description: Graphs for %= fqdn %

Anyone have any ideas?

It's puppet v3.1.1

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] deleting nodes in puppet-dashboard makes it hang

2013-05-08 Thread Klavs Klavsen
Hi,

I have 51 clients in puppet-dashboard – and when I tell it to delete a node 
– it simply hangs forever. If I try to just open / on the puppet-dashboard 
website – I get a proxy timeout (I have apache in front).

I end up having to kill webrick and start it again – with the node NOT 
being deleted :(

I have commented on an issue here - which seems to be about the same: 
http://projects.puppetlabs.com/issues/20147#change-90580

Anyone have had this problem, and perhaps found a solution? or did you go 
in and fired off some sql to delete the node (and which sql) ?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet Dashboard 1.2.23 issue deleting node

2013-05-07 Thread Klavs Klavsen
Found out anything about why this is ? Any fix ?

deleting a node hangs puppet-dashboard here :( - I have to restart to get 
it up again.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Installing packages on windows - fail :(

2013-05-03 Thread Klavs Klavsen


Den fredag den 3. maj 2013 00.22.29 UTC+2 skrev denmat:

 Sorry, I don't do much windows so can't be of much help but how does 
 running the install command from the windows command line go? Does that 
 install okay?


Yup - works just fine. The fact that the same paths work fine on windows 
2008 (for that MSI) - I just tested another MSI - and it fails with the 
same INT 24 error on BOTH  windows server 2003 and 2008 (whereas on the 
same 2008 - the sflow msi installs fine).

I'm ripping my hair out here :( - and I'd hate to have to use (and learn) 
altiris on Windows, instead 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 an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Installing packages on windows - fail :(

2013-05-02 Thread Klavs Klavsen
Hi guys,

I'm trying to make puppet install packages on windows.

It will install exe files just fine - but msi files won't be installed. 
They fail consistently :(

I've tried both having the files on a central directory - and give an UNC 
path to it, and with a file resource, putting the file in c:\temp\ - they 
both give the same result upon install:

package { sflow:
source = $architecture ? {
'x86' = 
'C:\\temp\\hsflowd-win-1.22.2-x86.msi',
'x64' = 
'software01\\autorepo$\\hsflowd-win-1.22.2-x64.msi',
default = 'unsupported 
architecture'
},
name = $architecture ? {
'x86' = 'sflow',
'x64' = 'sflow',
}
}

If I use urls like:
'c:\\temp\\hsflowd-win-1.22.2-x86.msi' - I get Failed to install: The 
network name cannot be found - after puppet runs: 
msiexec.exe /qn /norestart /i c:\\temp\hsflowd-win-1.22.2-x86.msi

If I use urls like:
'c\:\\temp\\hsflowd-win-1.22.2-x86.msi'

it fails with: Failed to install: Fail on INT 24

Using Puppet-3.1.1 client on Windows Server 2003.

How do you guys install msi's on windows? :(



-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Installing packages on windows - fail :(

2013-05-02 Thread Klavs Klavsen
On windows server 2008 - it works perfectly.

Den torsdag den 2. maj 2013 15.41.35 UTC+2 skrev Klavs Klavsen:

 Hi guys,

 I'm trying to make puppet install packages on windows.

 It will install exe files just fine - but msi files won't be installed. 
 They fail consistently :(

 I've tried both having the files on a central directory - and give an UNC 
 path to it, and with a file resource, putting the file in c:\temp\ - they 
 both give the same result upon install:

 package { sflow:
 source = $architecture ? {
 'x86' = 
 'C:\\temp\\hsflowd-win-1.22.2-x86.msi',
 'x64' = 
 'software01\\autorepo$\\hsflowd-win-1.22.2-x64.msi',
 default = 'unsupported 
 architecture'
 },
 name = $architecture ? {
 'x86' = 'sflow',
 'x64' = 'sflow',
 }
 }

 If I use urls like:
 'c:\\temp\\hsflowd-win-1.22.2-x86.msi' - I get Failed to install: The 
 network name cannot be found - after puppet runs: 
 msiexec.exe /qn /norestart /i c:\\temp\hsflowd-win-1.22.2-x86.msi

 If I use urls like:
 'c\:\\temp\\hsflowd-win-1.22.2-x86.msi'

 it fails with: Failed to install: Fail on INT 24

 Using Puppet-3.1.1 client on Windows Server 2003.

 How do you guys install msi's on windows? :(





-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: how do you test and release puppet changes?

2013-05-02 Thread Klavs Klavsen
I've heard of some, who use mcollective to order a test-run on all nodes, 
against an environment - with --noop - and then they watch puppet-dashboard 
for nodes that had changes (which ofcourse weren't actually done - because 
of --noop).

I was thinking of doing exactly that - and then exploiting the feature of 
puppet-dashboard's environments - so a test of --environment klavs - would 
make the reports get imported into the klavs environment in 
puppet-dashboard as well - effectively giving each puppet dev their own 
dashboard - in which they can see results of ordered tests (run on ALL 
actual production hosts) - and see if something would have changed - that 
shouldn't etc.

Where I'd go from there, depends on the experience we gather from that :)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet master on the internet

2013-04-29 Thread Klavs Klavsen
Well - as everything else - there can be security issues, where the SSL 
cert check won't help you: 
https://puppetlabs.com/security/cve/cve-2013-1640/

So you should definetely be careful - Puppet is very young, compared to 
apache, openssh and others that have been internetfacing for many, many 
years (and had their share of security bugs).

I'd probably filter access to puppet, based on ip-ranges - just to heavily 
lessen the potential attacking base :)

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Nagios Module Facter Lib 'mountpoints.rb' Causing Windows Clients to Not Operate Properly

2013-04-10 Thread Klavs Klavsen
I think it's:
  ENV[PATH]=/bin:/sbin:/usr/bin:/usr/sbin

That gives you problems.

don't set ENV['PATH'].. if you really need to set path (the path set there 
is unnecessary AFAIK), you can set it with the with_env function.

So the ENV.. setting. (it is inherited to all other facts and puppet 
itself, scewing up on windows, where that path is not valid).

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: replacing mkdir -p

2013-04-09 Thread Klavs Klavsen
pls. post if you upload it to the forge or somewhere else.. would 
definetely be interested in getting rid of mkdir -p :)

Den tirsdag den 9. april 2013 18.56.33 UTC+2 skrev Mike Power:

 I'll see if I can open source the component I wrote and upload it to 
 puppet forge.  In this way the open source community can continue the 
 debate about what is the best way to do this, while at the same time those 
 who want can use some solution other than mkdir -p


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: What's your hiera tree look like?

2013-03-25 Thread Klavs Klavsen
I use Netgroups (with LDAP as backend) to group my nodes.

Netgroups is an old NIS thing, which works beautifully. You can group 
hosts, and each netgroup, can contain other netgroups, users or hosts.

This way, a host can be a member of several netgroups - and I use netgroup 
membership to determine something akin to roles. Currently I have to use 
IN and netgroups.include in my templates.

$netgroups - is a paramater my script adds (by way of external_nodes = 
/path/to/script).

One thing I would very much like, is to hiera to support lookup, based on 
netgroups (which is an array). That is definetely the missing part in my 
puzzle.

I use the same netgroups for many other things (such as access control - I 
have a central file (used by PAM) which defines which groups can access 
which netgroups).

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Custom type and provider development

2013-03-21 Thread Klavs Klavsen
Did you get any further with the installutil provider?

It sounds really interesting - I myself is trying to automate install of 
PerfTab (a .net application).. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: how to customize hiera lookups per node?

2013-03-18 Thread Klavs Klavsen
I solved this issue, by using netgroups (in LDAP) - which is loaded into 
puppet, by a script which is run by external_nodes setting (it just 
provides parameters - no actual nodes).

This way, a server can have multiple roles (by being in multiple 
netgroups). 

Unfortunately hiera can't currently handle if an array in it's lookup 
hierachy - now that would be a really great addition to hiera :)

I then just group servers (or other netgroups) in netgroups as needed.


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppetdb startup fail - after move of datadir

2012-12-19 Thread Klavs Klavsen
My puppetdb fails with this message:
 java -jar /usr/share/puppetdb/puppetdb.jar services -c 
/etc/puppetdb/conf.d/config.ini
java.io.EOFException: null
 at java.io.DataInputStream.readInt (DataInputStream.java:392)
org.apache.kahadb.util.SequenceSet$Marshaller.readPayload 
(SequenceSet.java:41)
org.apache.kahadb.page.PageFile.loadFreeList (PageFile.java:559)
org.apache.kahadb.page.PageFile.load (PageFile.java:328)
org.apache.activemq.store.kahadb.MessageDatabase.loadPageFile 
(MessageDatabase.java:235)
org.apache.activemq.store.kahadb.MessageDatabase.open 
(MessageDatabase.java:325)
org.apache.activemq.store.kahadb.MessageDatabase.load 
(MessageDatabase.java:374)
org.apache.activemq.store.kahadb.MessageDatabase.doStart 
(MessageDatabase.java:223)
org.apache.activemq.store.kahadb.KahaDBStore.doStart 
(KahaDBStore.java:180)
org.apache.activemq.util.ServiceSupport.start (ServiceSupport.java:53)
org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.start 
(KahaDBPersistenceAdapter.java:186)
org.apache.activemq.broker.BrokerService.start (BrokerService.java:493)
com.puppetlabs.mq$start_broker_BANG_.invoke (mq.clj:42)
com.puppetlabs.puppetdb.cli.services$_main.doInvoke (services.clj:281)
clojure.lang.RestFn.invoke (RestFn.java:421)
clojure.lang.Var.invoke (Var.java:405)
clojure.lang.AFn.applyToHelper (AFn.java:163)
clojure.lang.Var.applyTo (Var.java:518)
clojure.core$apply.invoke (core.clj:600)
com.puppetlabs.puppetdb.core$_main.doInvoke (core.clj:80)
clojure.lang.RestFn.applyTo (RestFn.java:137)
com.puppetlabs.puppetdb.core.main (:-1)

I moved /var/lib/puppetdb to a new disk - mounted under /mnt/puppetdata - 
and bind mounted /var/lib/puppetdb to /mnt/puppetdata/puppetdb (which is 
where I copied the data).

I have disabled selinux - and ownership of files, remains puppetdb.

I can't figure out what to look at next - and that error message doesn't 
give any google results that seems usable.. 

Any hints? 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/U6hro33Pz2MJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] ensuring puppet version - Ubuntu problem

2009-03-20 Thread Klavs Klavsen

Hi,

I've setup puppet to install apache2 version 2.2.9-7 (which isn't
available to the client).

Puppet installs apache-2.2.8-1ubuntu0.3.

Isn't it suppose to fail instead, when I've defined a version it can't
install?

This is my apache2 class:
class apache2 {
$packagelist = [apache2]
package { $packagelist:
ensure = 2.2.9-7,
ensure = installed,
}

file { /etc/apache2/apache2.conf:
ensure = present,
owner = root,
group = root,
mode = 644,
source = puppet://puppetmaster.u.net/files/apache2/apache2.conf,

}

service { apache2:
hasrestart = true,
hasstatus = true,
enable = true,
ensure = running,
require = Package[apache2]
}
}

/klavs


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: ensuring puppet version - Ubuntu problem

2009-03-20 Thread Klavs Klavsen

I found that according to a comment in the apt provider, it does not
yet support enforcing versions :(

I guess I'll have to implement it, if I really need it :)

On 20 Mar., 15:32, Klavs Klavsen kl...@enableit.dk wrote:
 Hi,

 I've setup puppet to install apache2 version 2.2.9-7 (which isn't
 available to the client).

 Puppet installs apache-2.2.8-1ubuntu0.3.

 Isn't it suppose to fail instead, when I've defined a version it can't
 install?

 This is my apache2 class:
 class apache2 {
 $packagelist = [apache2]
 package { $packagelist:
 ensure = 2.2.9-7,
 ensure = installed,
                 }

 file { /etc/apache2/apache2.conf:
 ensure = present,
 owner = root,
 group = root,
 mode = 644,
 source = puppet://puppetmaster.u.net/files/apache2/apache2.conf,

                 }

 service { apache2:
 hasrestart = true,
 hasstatus = true,
 enable = true,
 ensure = running,
 require = Package[apache2]

 }
 }

 /klavs
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---