Re: [Puppet Users] disabling puppet agent auto-runs on a host

2013-11-25 Thread Calvin Walton
#x27;re only ever going to be using e.g. 'puppet agent --test' or 'puppet apply foo.pp' on the command line, then you don't need puppet running as a daemon at all. Just stop the service, disable the init script, and you're good to go. -- Calvin Walton -- You

Re: [Puppet Users] request for /proc/cpuinfo examples from aix, hpux, kfreebsd, & non-x86 linux

2013-10-23 Thread Calvin Walton
e /proc/cpuinfo from a Linux ARM platform (in this case, a Google/LG Nexus 4 smartphone - platform codename "mako") You don't have any existing testcases for a quad-core ARM device, so it might be useful for you. (Attached so as to preserve tabs vs. spaces formatting.) -- Calvin

Re: [Puppet Users] hiera and defaults

2013-08-26 Thread Calvin Walton
ense for general use. For example, I make a class: class server ( $database = 'mysql' ) { ... } include server Then in my hiera yaml file, I set the database type to postgres instead: server::database: postgresql In this case, I'd expect the value from hiera to override the

Re: [Puppet Users] realizing virtual resource does not match on default properties

2013-04-30 Thread Calvin Walton
s.puppetlabs.com/issues/9655 which looks related, but I'm not sure if it's the same issue. It would probably be a good idea to open a bug specifically for the issue you're seeing. I would expect this to work :) -- Calvin Walton -- You received this message because you are subscr

Re: [Puppet Users] Re: Puppet 3.1, Hiera and a class parameter called "service"

2013-04-18 Thread Calvin Walton
x27;hiera' function does not suffer from this bug. This requires no changes to your yaml file or elsewhere in the code, and can be removed once you upgrade to a puppet version that includes the fix. -- Calvin Walton -- You received this message because you are subscribed to the Google Gr

Re: [Puppet Users] How we can create two database Using same credetial using Puppet

2013-03-21 Thread Calvin Walton
ql', require => Class['mysql::server'], } database_user { 'u...@example.com': ensure => 'present', password_hash => mysql_password('user123'), provider => 'mysql', require => Database[&#x

Re: [Puppet Users] Puppet to copy file instead of symlink

2013-03-05 Thread Calvin Walton
s this possible? > many thanks, > David. When you read the fine documentation located at: http://docs.puppetlabs.com/references/latest/type.html#file You will note that there is a "links" parameter on the file resource that can be used to set the behaviour with regards to symlinks. -- C

Re: [Puppet Users] Referencing a variable from one class in another

2013-01-28 Thread Calvin Walton
iable $apache::params::something from inside the kibana::apache class, you need the apache::params class to be parsed on the puppet master before the kibana::apache class. This is a parse-time ordering problem, not a run-time ordering problem. The only way to force parse-time ordering right now is

Re: [Puppet Users] Referencing a variable from one class in another

2013-01-28 Thread Calvin Walton
On Mon, 2013-01-28 at 11:00 -0600, Ti Leggett wrote: > On Jan 28, 2013, at 10:56 AM, Calvin Walton wrote: > > > The fix is trivial, just add an "include apache::params" (or even just > > "include apache") at the top of your kibana::apache class, like s

Re: [Puppet Users] Referencing a variable from one class in another

2013-01-28 Thread Calvin Walton
class, like so: # modules/kibana/manifests/apache.pp class kibana::apache ( $version = $kibana::params::parameters['version'], ) { include apache::params @file { $kibana::params::apache_config: ... However, this conflicts with the class {} style declarations in your apache/m

Re: [Puppet Users] site.pp referring to other manifests without modules

2012-12-21 Thread Calvin Walton
On Fri, 2012-12-21 at 16:09 -0500, Calvin Walton wrote: > On Tue, 2012-12-18 at 09:09 -0800, r...@certifydatasystems.com wrote: > > Hi all, > > > > I want to do some code reuse, and modules seem overkill. Is it possible to > > have something like this? > >

Re: [Puppet Users] site.pp referring to other manifests without modules

2012-12-21 Thread Calvin Walton
om' { > include myuser > .. other things .. > } > > node 'bar.example.com' { > include myuser > .. other things .. > } Then these 'include's will automatically find the file modules/myuser/init.pp and load it for you. That's it! -- Calvin Wa

Re: [Puppet Users] Re: Remove certificate requests

2012-12-21 Thread Calvin Walton
#x27;puppet cert clean' used to work to clean unsigned certificates in puppet 2.7, but no longer does in 3.0 -- Calvin Walton -- 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@googlegroup

Re: [Puppet Users] puppet.conf questiosn

2012-12-02 Thread Calvin Walton
this fairly easily by editing the init script (on debian/ubuntu you can do this in /etc/defaults/puppetmaster) to pass "--config_file_name=puppetmaster" when starting the master process. -- Calvin Walton smime.p7s Description: S/MIME cryptographic signature

Re: [Puppet Users] Could not parse for environment production: Syntax error at '{'; expected '}' at

2012-10-30 Thread Calvin Walton
clude apache::snippet { site-test.conf }, > } apache::snippet isn't a class, so you don't use 'include' on it. You use it the same as a native puppet type. Your node.pp should look like this: node 'thegrid.geofusion' { include apache apache::snippit { 'site-test.conf': } } -- Calvin Walton smime.p7s Description: S/MIME cryptographic signature

Re: [Puppet Users] Using regex to match hostnames in hiera

2012-10-26 Thread Calvin Walton
stgroup = regsubst($clientcert, '-*\d+$', '') in hiera.yaml: :yaml: :datadir: /etc/puppet/environments/${environment}/manifests/hiera :hierarchy: - hostnames/%{clientcert} - hostgroups/%{hostgroup} - common Then you can use puppet3's automatic class parameter lookup, or call the hiera() functions anywhere in your manifest. -- Calvin Walton smime.p7s Description: S/MIME cryptographic signature

Re: [Puppet Users] Accessing variable from a user defined resource in the same module

2012-10-26 Thread Calvin Walton
on't use the $ character on variable names. If the template is being used directly in the mname::config type, you can do <%= @a %> (preferred) or <%= a %> -- Calvin Walton smime.p7s Description: S/MIME cryptographic signature

Re: [Puppet Users] Possible to exclude an event in Puppet dashboard?

2012-10-22 Thread Calvin Walton
acts are uploaded to the puppet master *before* any of the code in your manifest executes, so anything done in your manifest will only affect the facts for the next puppet run. -- Calvin Walton smime.p7s Description: S/MIME cryptographic signature

Re: [Puppet Users] Retiring information from collections

2012-10-17 Thread Calvin Walton
"foo"? If you're using puppetdb, you can run the following command: # puppet node deactivate foo.example.com This is documented at http://docs.puppetlabs.com/puppetdb/1/maintain_and_tune.html#deactivate-decommissioned-nodes -- Calvin Walton -- You received this message becaus

Re: [Puppet Users] Resource Chaining Classes

2012-09-10 Thread Calvin Walton
ld be ordered only relative to each-other. The general advice that I've seen is that you should use a limited number of stages only for cases like this where you need some system setup that is independent of the other things that you'll be installing on the system, and must be ordered befo

Re: [Puppet Users] Possible to copy ssh key from node A to node B?

2012-08-30 Thread Calvin Walton
rently have a really nasty hack with a generator script that runs on the puppet master, which works, but is a bit fragile - and will fail if I ever want to scale to multiple puppet masters. It looks like this: https://gist.github.com/3531206 -- Calvin Walton -- You received this message beca

Re: [Puppet Users] Speed up file resource on Windows

2012-08-30 Thread Calvin Walton
reate a file resource for each subdirectory and file in the tree, then sync each file separately. If you have the ability to put the directories in packages and install them, or even just put them in a zip archive and unzip them to install them, you will see much better performance. -- Calvin Wal

Re: [Puppet Users] How to set default values for downloaded modules?

2012-08-24 Thread Calvin Walton
'myconfig::ntp' (or any different name, 'ntp_local', etc.) would work fine. This would look like class myconfig::ntp { class { 'ntp': server_list => [ 'a.example.com', 'b.example.com' ] } } note testsrv { in

Re: [Puppet Users] How to modify client authentication in passenger based puppet master behind ssl proxy

2012-08-18 Thread Calvin Walton
be authenticated as whomever it wants by just adding headers to the request. -- Calvin Walton -- 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 gr

Re: [Puppet Users] Override a file{} directive - is it possible?

2012-08-18 Thread Calvin Walton
of the nodes where you don't want to use the limits.conf file, you can just set the variable to true: node special_box { include some_classes $security_limits_disabled = true } -- Calvin Walton -- You received this message because you are subscribed to the Google Groups "Pup

Re: [Puppet Users] Array Length

2012-08-15 Thread Calvin Walton
>") if it's from somewhere else. Remember: everything between <% and %> in the template is interpreted as ruby code. Everything outside is passed through as text to the output. -- Calvin Walton -- You received this message because you are subscribed to the Googl

Re: [Puppet Users] Delete "unmanaged" files in directory

2012-08-08 Thread Calvin Walton
rue, purge => true, like so: file { '/etc/apache/sites-enabled': ensure => 'directory', recurse => true, purge => true, } Make sure you read the documentation for details: http://docs.puppetlabs.com/references/latest/type.html#file -- Calvin Walton

Re: [Puppet Users] File default precedence..?

2012-08-04 Thread Calvin Walton
really complicated if you set resource defaults in a class, then include another class from in that one; so don't do that. -- Calvin Walton -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppe

Re: [Puppet Users] Can an template (erb file) get installed via a package resource?

2012-08-01 Thread Calvin Walton
epository for example. It would make sense to bundle everything together into a puppet "module", even if you aren't using a master/agent setup. Read through http://docs.puppetlabs.com/learning/modules1.html#modules to find out how this works. -- Calvin Walton -- You received this

Re: [Puppet Users] Running "make" via puppet manifest

2012-08-01 Thread Calvin Walton
that the file is untarred before the make command is run. Take a look at http://docs.puppetlabs.com/references/latest/type.html#exec for descriptions of the parameters being passed to the exec. > } You should really give the rest of the puppet documentation a read through as well; http://docs.p

Re: [Puppet Users] rand losing its randomness after using fqdn_rand

2012-08-01 Thread Calvin Walton
md5' max = args.shift -srand(Digest::MD5.hexdigest([lookupvar('::fqdn'),args].join(':')).hex) +old_seed = srand(Digest::MD5.hexdigest([lookupvar('::fqdn'),args].join(':')).hex) rand(max).to_s +srand(old_seed) end -- Calvin Walton --

Re: [Puppet Users] err: Invalid parameter hostgroup at line 370 on node

2012-08-01 Thread Calvin Walton
, you might try something like this: define host($ip = 'UNSET') { if $ip == 'UNSET' { $ip = $::fqdn } ... } -- Calvin Walton -- You received this message because you are subscribed to the Google Groups "Puppet Users" group.

Re: [Puppet Users] Installing a customized package: use custom repo / overwrite / patch?

2012-08-01 Thread Calvin Walton
D /path/to/script', command => 'patch /path/to/script some-patch', require => [ Package['thepackage'], File['some-patch'] ], } If the package will always be installed and upgraded through puppet, you might consider making the exec '

Re: [Puppet Users] "Could not find dependency Package" even the package already theres.

2012-07-31 Thread Calvin Walton
resource itself will query the package management system to see if the package is installed, and will install it if it is missing. -- Calvin Walton -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email t

Re: [Puppet Users] Creating Subgroups in Puppet Dashboard

2012-07-22 Thread Calvin Walton
an also override individual properties by setting them on the node directly, in case you have a one-off situation. -- Calvin Walton Blindside Networks http://www.blindsidenetworks.com/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group.

[Puppet Users] Re: Gentoo package provider

2012-06-26 Thread Calvin Walton
On Thursday, 21 June 2012 14:04:05 UTC-4, Stefan Schulte wrote: > In my opinion these changes should fix all the issues above. One issue > will > still exists though: You can install multiple versions of the same package > (slots): > > # portageq match / autoconf > sys-devel/autocon