[Puppet Users] Re: hiera_array() default value not taken

2012-04-06 Thread Hunter Haugen
Looks like a default of [] triggers https://github.com/puppetlabs/hiera-puppet/blob/master/lib/puppet/parser/functions/hiera_array.rb#L32 to think that the `.lookup` function did not get an answer. Hiera and Hiera-puppet have to distinguish between empty/false/nil answers sent by the backend

Re: [Puppet Users] Re: Duplicating web servers

2010-10-01 Thread Hunter Haugen
Also of note, if you're using Puppet 2.6.x then the command `ralsh` from 0.25.x has been superseded by the `puppet resource` command. -Hunter On Fri, Oct 1, 2010 at 08:34, Matt Wallace wrote: > On Friday 01 Oct 2010 15:01:25 Kikanny wrote: >> Thank you all for taking your time to explain it to

Re: [Puppet Users] stages examples/advices

2010-10-18 Thread Hunter Haugen
asses and then enforce ordering at the same time. The new syntax references the stages but doesn't actually define them, so you could do this: class orden { stage { [ 'repos', 'os', 'gLite', 'post' ]: } Stage['repos'] -> Stage['os&#

Re: [Puppet Users] is anyone using a tool to diagram their manifests?

2010-12-03 Thread Hunter Haugen
Have you seen the --graph option that generates .dot files of your generated catalogs? It's not global to all of your manifests, but it's a start. http://docs.puppetlabs.com/guides/faq.html#how-do-i-use-puppets-graphing-support -Hunter On Fri, Dec 3, 2010 at 14:50, psyber wrote: > bump? > > O

Re: [Puppet Users] iteration question

2010-12-03 Thread Hunter Haugen
The catalog that is shipped to the client is immediately applied without reevaluating the state of the client (that evaluation is done during catalog compilation on the master with the provided facts). I think what you're looking for is for puppet to download a catalog, revise the resources that s

Re: [Puppet Users] Re: Redmine upgrade beginning

2013-03-18 Thread Hunter Haugen
Looks like the upvote/downvote buttons are missing. (/red(dit|mine)/ anyone?) -Hunter On Thu, Mar 14, 2013 at 5:41 PM, Eric Sorenson wrote: > On Mar 14, 2013, at 5:12 PM, Eric Sorenson > wrote: > > > Hi, we're starting the upgrade to projects.puppetlabs.com now. There > will be a brief down

Re: [Puppet Users] puppetlabs-apache please help me to understand ssl_key & allow-ovverride

2013-07-01 Thread Hunter Haugen
Hello! Sorry for the confusion. It appears that the parameters you're referencing are from the master branch of the github repo, but are installing the older version from the forge (which has far less attention). The documentation on https://github.com/puppetlabs/puppetlabs-apache is only in refer

Re: [Puppet Users] "puppet module install" output is missing files for puppetlabs/firewall

2014-03-04 Thread Hunter Haugen
Thanks for pointing this out! The problem is that one of the spec files (spec/acceptance/nodesets/default.yml) is a symlink to another .yml file in that directory (usually centos-64-x64.yml). The `puppet module install` command downloads the tarball to a cache directory in /var, extracts, then mov

Re: [Puppet Users] Breaking changes in Puppetlabs_spec_helper v0.5.0

2014-06-09 Thread Hunter Haugen
Sorry about that; I was thinking of mocha as more of an extraneous dependency rather than a feature. Turns out that the mock_with :mocha line was a "feature" of puppetlabs_spec_helper and removing it changed the behavior of projects which depend on PSH. That's what I get for releasing on friday...

Re: [Puppet Users] puppetlabs-apache prefork vs. worker

2014-07-10 Thread Hunter Haugen
I think the parameter you're looking for is https://github.com/puppetlabs/puppetlabs-apache/#mpm_module So: class { 'apache': mpm_module => 'prefork', } class { 'apache::mod::php': } or if you need to provide the prefork module custom parameters: class { 'apache': mpm_module => false, } c

Re: [Puppet Users] Unit testing reference modules and best practices

2014-07-11 Thread Hunter Haugen
We try hard to use rspec-puppet in effective ways, but you may still see some over-testing in the supported modules nonetheless :). We use rspec-puppet to test that: 1. Manifests compile and templates parse (catches a lot of problems) 2. Conditional logic in manifests follows the expected paths f

Re: [Puppet Users] Error to install java7

2014-07-11 Thread Hunter Haugen
The path it is trying to download is /java7/files/jdk-7us-linux-i586.tar.gz . Is this where the file is located? Are all parent directories executable (and perhaps readable) by the user which your puppet master runs as? (Usually that user is 'puppet' or 'pe-puppet'.) -Hunter On Fri, Jul 11, 20

Re: [Puppet Users] The combined use of Ubuntu and CentOS

2014-07-14 Thread Hunter Haugen
Yep, totally possible. The puppet master daemon is platform-agnostic and uses the information sent from the agent (via `facter`) to know how to compile the catalog. So if your ubuntu agents check in, the master daemon makes ubuntu catalogs. If your centos agents (including the master managing itsel

Re: [Puppet Users] puppet-postgres error

2014-07-15 Thread Hunter Haugen
The validate_db_connection would come from https://github.com/puppetlabs/puppetlabs-postgresql#resource-postgresqlvalidate_db_connection which is declared by the postgresql::server -> postgresql::server::service class https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/server/

Re: [Puppet Users] Re: puppetlabs-corosync help using multiple primitive operations

2014-07-21 Thread Hunter Haugen
Reading through the type/provider code, it looks like it is not coded in a way to deal with entries with duplicate keys, and I don't see any open pull requests to deal with this either. The puppetlabs-corosync module is not currently under active development from the PL module team yet, though we a

Re: [Puppet Users] Re: puppetlabs-corosync help using multiple primitive operations

2014-07-22 Thread Hunter Haugen
On Tue, Jul 22, 2014 at 9:16 AM, wrote: > Hi Trey, > > I'm using Hiera and changed now: > > p_drbd_jira: > primitive_class: ocf > primitive_type: drbd > provided_by: linbit > parameters: > drbd_resource: jira > operations: > monitor: >

Re: [Puppet Users] puppetlabs-mysql

2014-07-23 Thread Hunter Haugen
The module is trying to read the cached password from /root/.my.cnf to connect, and since it's empty it tries with no password. (See https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/server/root_password.pp#L7-L19 for what puppet is doing with the root_password). You could creat

Re: [Puppet Users] puppetlabs-firewall module - purging unmanaged firewall chains?

2014-08-11 Thread Hunter Haugen
> > oogs@oogs-dev:/etc/puppet-dev/modules/firewall/lib/puppet/type$ grep -A6 > purge firewallchain.rb > newparam(:purge, :boolean => true) do > desc <<-EOS > Purge unmanaged firewall rules in this chain > EOS > newvalues(:false, :true) > defaultto :false > end > > I assume

Re: [Puppet Users] rspec-puppet and testing custom facts

2014-09-02 Thread Hunter Haugen
On Tue, Sep 2, 2014 at 10:48 AM, Brett Swift wrote: > > rspec-puppet supports classes, functions, defined types, but not facts. > > > spec > | > -> classses > -> defines > -> facts? ? ? ?? ? > > > Is there a recommended way to test facts? > You don't actually need any of the hel

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

2014-09-17 Thread Hunter Haugen
Yeah, basically `$docroot` is still a required parameter because historically it was required (apache::vhost didn't do proxy stuff) and was never updated. If you want to make a PR that makes it default to `undef` and then raises helpful errors in cases when it is needed, then that would be great :)

Re: [Puppet Users] puppetlabs-* forge modules and 'parser = future'

2014-09-29 Thread Hunter Haugen
On Thu, Sep 18, 2014 at 2:16 PM, Tim Skirvin wrote: > I decided to try out 'parser = future' today, and the first thing > to fail was puppetlabs-apache, with errors along the lines of: > > Filepath: > /srv/puppet/env/puppet/modules/apache/templates/httpd.conf.erb > Line: 19 >

Re: [Puppet Users] Moving to Directory Environments

2014-10-04 Thread Hunter Haugen
On Saturday, October 4, 2014, Felix Frank wrote: > Hi, > > On 10/04/2014 11:11 AM, Rachel Andrew wrote: > > > > I've created environments/production/modules and > > environments/production/manifests > > > > I believe I can just set default_manifest in my puppet.conf on the > > puppetmaster to /et

Re: [Puppet Users] puppetlabs/firewall and firewalld

2014-11-10 Thread Hunter Haugen
Unfortunately we (the puppetlabs module team) haven't yet started on the initiative to make this happen, but it has definitely been on our minds for a long while now. I made https://tickets.puppetlabs.com/browse/MODULES-1498 really quickly to begin tracking this work though; as of yet there is no

Re: [Puppet Users] How to solve $concat_basedir not defined error?

2014-12-12 Thread Hunter Haugen
The concat_basedir custom fact comes from the concat module https://forge.puppetlabs.com/puppetlabs/concat so on the agent, if you can run `facter concat_basedir` then puppet should be able to pick it up. It looks like you do have the concat module installed at /etc/puppet/modules/concat, and if y

Re: [Puppet Users] Re: Ordering dependencies and accessing state created earlier *in the same run*

2015-01-28 Thread Hunter Haugen
The way to think about getting commands to run during the apply phase is either by using exec resource (which basically don't have a return value so don't allow you to access the data you want) or with providers. In your example, if you wrote a custom notify provider, then instead of using the gen

Re: [Puppet Users] Re: Announce: Puppet Language Style Guide 2.0

2015-02-03 Thread Hunter Haugen
tl;dr Summarizing the feedback from Garrett, Trevor, and John (because email is hard), and see if we have resolution on some points and which ones we still need to clarify. = Questions: These need further discussion and clarification. == Section 10.7 Defines can't use inherits for parameter def

Re: [Puppet Users] Re: Announce: Puppet Language Style Guide 2.0

2015-02-04 Thread Hunter Haugen
> > == Section 10.7 Defines can't use inherits for parameter defaults >> Should this be reduced to only cover classes, or should the description >> be expanded to cover the style of setting defined resource defaults also? >> (Which happen to be the "bad" example; whoops.) >> > > > The guide's prefe

Re: [Puppet Users] Does the "Learning VM" image actually work?

2015-02-10 Thread Hunter Haugen
A tip on OS X about getting "inside" folder-app-things (like .app, .vmwarevm, etc). You can right click ("two finger" click) on the object, and select "Show package contents" to get into it with Finder. Then you'll be able to see the PDF. Or you can `cd` in a terminal into it, and `open .` to ope

[Puppet Users] Fwd: Modules Triage Time Change

2016-05-26 Thread Hunter Haugen
Hello, tl;dr Puppet Modules Community Triage meeting is moving to 17:00-18:00 UTC This is a quick note that in the last Puppet Modules Community Triage meeting we discussed a change in the specified time that the meeting happens. For those of you who are curious about what the triage meeting is,

[Puppet Users] Re: [Puppet-dev] Re: Modules Triage Time Change

2016-06-17 Thread Hunter Haugen
>> For those of you in APAC, we apologize for the still-inconvenient time >> slot. Feel free to reply here with ideas! >> >> > I just talked to Hunter on IRC. Maybe we can flip flop the times of the > meeting. For example 9:00UTC and the next week 17:00UTC. This would allow > us a kind of US meeti

Re: [Puppet Users] ntp keys - trusted, requestkeys

2015-03-12 Thread Hunter Haugen
It does not currently have a keys_file_content parameter or anything, so looks like no. You could use an additional file resource to manage that. A PR to the ntp module to manage the keys would be nice too :) -Hunter On Tue, Mar 10, 2015 at 7:44 AM, Robert Poulson wrote: > > >> >> So the ntp

Re: [Puppet Users] Re: Installing hiera-eyaml-gpg in Puppetserver

2015-03-12 Thread Hunter Haugen
For those following along at home, 0.5.rc1 has been pushed to rubygems and can be installed with `gem install hiera-eyaml-gpg --pre` or `puppetserver gem install hiera-eyaml-gpg --pre` :D Thanks raphink! -Hunter On Mon, Feb 16, 2015 at 1:54 AM, Raphink wrote: > For the record, I've decided t

Re: [Puppet Users] Upgrading from 0.25.1 to 3.7.4

2015-04-01 Thread Hunter Haugen
Wow, that's a pretty big jump :). It's not super terribly helpful, but each node should have a "classfile" that is often in the $vardir/classes.txt or $statedir/classes.txt that contains all the classes a node has applied to it in the last puppet run. I think `puppetd --configprint classfile` on a

Re: [Puppet Users] run beaker tests on a live system

2015-05-05 Thread Hunter Haugen
On Tue, May 5, 2015 at 6:31 AM, Thomas Müller wrote: > hi > > I'm trying to get started with beaker testing. we will introduce the > role/profile pattern and want to enforce the acceptance criterias per > profile class. Operations would like to reuse the puppet tests on live > systems to verify t

Re: [Puppet Users] Re: How do modules plan on dealing with Puppet 3.x incompatibilities?

2015-06-30 Thread Hunter Haugen
On Tue, Jun 30, 2015 at 7:51 AM Alessandro Franceschi wrote: > This topic is quite actual and interesting also for me. > I think PuppetLabs is following the first approach, and that's what I'm > inclined to do. > Yep. The planned approach is to specify puppet 4.x (or whatever) in the metadata.js

Re: [Puppet Users] puppet firewall module and more esoteric rules

2015-07-07 Thread Hunter Haugen
Filed as a bug: https://tickets.puppetlabs.com/browse/MODULES-2197 On Fri, Jul 3, 2015 at 1:14 AM Tom Boland wrote: > Hi all, > > I've been looking at using the puppet firewall module to define the > rules on a load balancer/proxy I'm working on. Unfortunately, I don't > think it's going to wor

Re: [Puppet Users] PuppetLabs Netscaler Module

2015-07-13 Thread Hunter Haugen
The module is apparently using ruby >=1.9 hash syntax which is not supported by 1.8 https://github.com/puppetlabs/puppetlabs-netscaler/blob/master/lib/puppet/util/network_device/transport/netscaler.rb#L12 Whoops. You are welcome to send a patch and change all the `url: url` to `:url => url` etc, o

Re: [Puppet Users] PuppetLabs Netscaler Module

2015-07-14 Thread Hunter Haugen
That error appears to still be the same thing (ruby barfing on the hash argument `parent: Puppet::Provider::Netscaler` . I made https://github.com/puppetlabs/puppetlabs-netscaler/pull/157 to change all the 1.9 hashes to normal hashes, so you can give that a go and see if it works. On Tue, Jul 14,

Re: [Puppet Users] Modul postgresql cannot handle negative value when writing config files

2015-07-15 Thread Hunter Haugen
The provider does appear to try and handle fixnums to not be quoted https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/lib/puppet/provider/postgresql_conf/parsed.rb#L20 What version of puppet is this? What errors are you getting with unquoted -1 values? `value => -1` appears to be the

Re: [Puppet Users] Modul postgresql cannot handle negative value when writing config files

2015-07-16 Thread Hunter Haugen
On Wed, Jul 15, 2015 at 11:36 PM wrote: > Hi, > > thanks for your feedback. I provided some more information, unfortunately > the suggested quoting did not work. > Oh, I wouldn't recommend quoting numbers; just strings. > > installed software > ## > facter

Re: [Puppet Users] Error: undefined method `<' for :undef:Symbol at

2015-07-16 Thread Hunter Haugen
On Thu, Jul 16, 2015 at 11:21 AM Fabien Delpierre < fabien.delpie...@gmail.com> wrote: > Hi folks, > First off, let me underline that I'm completely new to Puppet. I'm an > intermediate Chef user but just changed jobs, and the new place is a Puppet > shop and I've never touched Puppet in my life.

Re: [Puppet Users] Virtual resources, collectors, and overrides.

2015-07-17 Thread Hunter Haugen
Both of these methods seems to work on puppet 4, and you could try on puppet 3: @notify { 'one': before => Notify['two'], } @notify { 'two': } Notify <| title == 'one' |> { before => undef, } OR @notify { 'one': before => Notify['two'], } @notify { 'two': } Notify <| title == 'one' |> { befo

Re: [Puppet Users] rspec question: how to test that no resource exists with certain parameters?

2015-07-20 Thread Hunter Haugen
There is no helper built in to rspec-puppet to do this, but you can do it by using an rspec expect() around a catalogue.resources check: it "has no file resources with ensure => directory" do expect(catalogue.resources.select { |r| r.type == "File" && r[:ensure] == "directory" }).to be_empty end

Re: [Puppet Users] is there any way to get rspec to tell you the contents of the catalog on a failure?

2015-07-22 Thread Hunter Haugen
When I get a vague failure, such as "expect File[/whatever] to be in the catalog" and don't know why it's not, I put a pry in the `it` block before the test failure and re-run. It will drop you into a pry prompt and you can inspect the catalog manually by running `catalogue` and look for anything t

Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread Hunter Haugen
On Fri, Aug 7, 2015 at 1:48 PM wrote: > Hi all! > > I'm having trouble with a custom type's type-wide validate call. I've > done a lot of digging into the Puppet documentation and a lot of Googling > and haven't found a lot of guidance. My Puppet version is 3.7.5. > > Basically, I have a prope

Re: [Puppet Users] validating array property in custom_type

2015-08-11 Thread Hunter Haugen
do >> desc "List of database servers; first server in the list will be >> considered the primary server" >> >>* isrequired* >> def insync?(is) >> return false unless is == should >> true >> end >> >> en

Re: [Puppet Users] puppetlabs apache and extra conf.d files

2015-11-05 Thread Hunter Haugen
The apache module contains many mod manifests [1] that use file resources with templates [2] that you can pattern your code after. No need to use apache::vhost at all. [1] https://github.com/puppetlabs/puppetlabs-apache/tree/master/manifests/mod [2] https://github.com/puppetlabs/puppetlabs-apache/

Re: [Puppet Users] POC Update for PuppetForce Apache Module

2016-01-05 Thread Hunter Haugen
Hi AJ! Ooo, this sounds like a desirable feature for the apache module. On Tue, Jan 5, 2016 at 5:14 AM, A J wrote: > Hello, > > I am new to distributed development and Puppet. The one thing that was > bothering since I started learning this product is the lack of ability to > run more than one

Re: [Puppet Users] How to manage half file.

2016-01-13 Thread Hunter Haugen
Does the application have an "include" syntax that would allow you do have one file that is one line that the application manages, and the file that puppet manages includes it where appropriate? Or a stupid workaround would be to have a fact that is that one line, and a puppet template that adds t

Re: [Puppet Users] puppet 3 to 4 deprication error

2016-01-22 Thread Hunter Haugen
I don't see anything in that line that is incompatible with puppet 4's parser. Perhaps previous lines that set the values of $enable_nfsd or $local_nfsd are affected by the parser? -Hunter On Fri, Jan 22, 2016 at 11:30 AM, wrote: > The values are defined and this class is working with puppet3

Re: [Puppet Users] firewall module to accept array of sources/dests

2016-02-11 Thread Hunter Haugen
The difficulty with allowing multiple sources is that it falls in line only with a scripted workflow, not an idempotent workflow. This is from the iptables manpage: "Multiple addresses can be specified, but this will expand to multiple rules (when adding with -A), or will cause multiple rules to be

[Puppet Users] Changes to Puppet Enterprise compatibility module metadata

2016-03-21 Thread Hunter Haugen
Summary: If you frequent the Puppet Forge, you are probably familiar with this box, which indicates the compatibility of various operating systems, Puppet versions, and Puppet Enterprise versions available at the top of every module page: [image: pe_metadata.png] In the near future, the Forge wi

Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Hunter Haugen
Given the resource you want to apply this pattern to, it can be turned into a one-liner with a collector: file { '/tmp/something': ensure => file, } File['/tmp/something'] ~> Service <| title == 'apache2' |> This means that if there is a service with a title of apache2 EVER added to the catalog

Re: [Puppet Users] Puppet 4 syntax highlighting in Wordpress

2016-04-11 Thread Hunter Haugen
On Mon, Apr 11, 2016 at 4:55 PM, Trevor Vaughan wrote: > Nigel, that is pure sorcery and how did I not know this existed?! > > On Mon, Apr 11, 2016 at 3:48 PM, Nigel Kersten wrote: > >> I do Puppet syntax highlighting like this: >> >> Open up puppet code in Vim with syntax highlighting on. >> >>