[Puppet Users] Is this possible with Hiera - Puppet Module Development and using Hiera

2012-06-18 Thread Peter J. Foley
Hi Puppet Users,

I have just started playing with Puppet and Hiera.  I am curious if it is 
possible to control how hiera does variable lookup within a module I am 
creating to test it.

I have read through the documentation I can find on Hiera and Puppet however I 
cannot find any documentation suggesting a way to it.

For the record these are the versions that I am using (taken from the 
Puppetlabs Debian/Devel):
hiera (1.0.0-0.1rc3)
hiera-puppet (1.0.0-0.1rc1-1-g3e68ff0)
puppet-common (3.0.0-0.1rc3puppetlabs1)
puppet (3.0.0-0.1rc3puppetlabs1)

Essentially I would like to define a hiera.yaml file (just the hierarchy and 
puppet datasource location) within my module and use it to clearly separate 
Operating System differences to the default state.  For example:

-- {modulepath}/hiera.yaml ===--
:hierarchy:
   - %{operatingsystem}
- defaults

:puppet:
   :datasource: %{modulename}/config/
--===--

So in my module directory I could have:
{modulepath}/config/debian.pp
{modulepath}/config/centos.pp
{modulepath}/config/defaults.pp

(It would be even better if in the file name somehow we could grip up similar 
OS types, ie debian_ubuntu.pp)

I know that I can use puppet logic statements (case statements, if, ...) to set 
variables per OS but I feel that it would be cleaner and clearer to separate 
the OS specific stuff and it would be easier to update a module for a specific 
OS and override something set in the defaults.pp file.

So is this possible or is this something that could be considered as a feature 
request.

Thanks,

Peter.

-- 
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] Installation of Hiera from apt.puppetlabs.com

2012-05-16 Thread Peter J. Foley
Hi Puppet Users,

According to the installation instructions 
(https://github.com/puppetlabs/hiera#installation) located in the readme.md 
file at https://github.com/puppetlabs/hiera there should be an apt package 
located at apt.puppetlabs.com.  I have looked within the repo and cannot find a 
package.

Is this a documentation error or is there a deb package?

Thanks,

Peter

-- 
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] Failed to parse template ... private method 'split' called for :undef:Symbol - github - puppetlabs/puppet-dhcp

2012-04-16 Thread Peter J. Foley
Hi Puppet Users,

Puppet Version - v2.7.13
Ruby Version - ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

I am trying to use the Puppetlabs DHCP module 
(https://github.com/puppetlabs/puppet-dhcp) to setup a DHCP server on one of my 
nodes.

I have followed the example in the readme.md file in my node declaration for 
the server (extracted part below)

  class { 'dhcp':
dnsdomain=> ['dev.ifoley.local', '200.168.192.in-addr.arpa'],
nameservers  => ['192.168.200.1', '192.168.10.211'],
ntpservers   => ['titanium.ifoley.local', 'core.dev.ifoley.local'],
interfaces   => ['eth0'],
  }

  ### dhcp::pool Define the pool attributes

  dhcp::pool{ 'dev.ifoley.local':
network => '192.168.200.0',
mask=> '255.255.255.0',
range   => '192.168.200.11 192.168.200.20',
gateway => '192.168.200.1',
  }

To confirm everything is working I then try to manually initiate a puppet run

puppet apply -v /etc/puppet/manifests/nodes/core.dev.ifoley.local.pp

Which spits out an error message:

Failed to parse template dhcp/dhcpd.conf.erb: private method `split' called for 
:undef:Symbol at /etc/puppet/modules/dhcp/manifests/init.pp:46 on node 
core.dev.ifoley.local

In the template 
(https://github.com/puppetlabs/puppet-dhcp/blob/master/templates/dhcpd.conf.erb)
 there is only one location that uses a split method which is on the 
dnsupdatekey.  As you can see from the above class definition for dhcp I have 
not passed a dnsupdatekey.

I currently do not have DNS setup for Dynamic Updates so do not want to 
configure the DHCP server to update DNS.

The code that uses the split function should not be executed because it is 
protected by test to confirm that it is not undefined.  My question is am I 
doing something wrong?

Thanks,

Peter.

-- 
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.