[Puppet Users] ssh module dependency failure

2014-01-16 Thread Jose Luis Ledesma
I think the error is here: 

require => Class["ssh:install"]

Should be ssh::install

Regards

-- 
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/867220e8-2ca7-4089-875b-0540fd19941b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ssh module dependency failure

2014-01-16 Thread Johan De Wit

Hi,

If you have put you class in one big, you will get this error.

Every class must have its own pp file

modules/ssh/manisfests/init.pp (class ssh)
   install.pp (class ssh::init)
   config.pp (class ssh::config)

and so on

more info  : 
http://docs.puppetlabs.com/puppet/2.7/reference/lang_namespaces.html


hth

Grts

Jo



On 01/16/2014 06:25 AM, Tim Dunphy wrote:

Hi All,


I'm writing to you today because I am attempting to follow along in 
the "Pro Puppet" book I am attempting the ssh module example from page 39.


I am getting the following error on the client when I try to implement it:

[root@beta:~] #puppet agent --test --server puppet.mydomain.com 


info: Caching catalog for beta.mydomain.com 
err: Failed to apply catalog: Could not find dependency 
Class[Ssh:install] for File[/etc/ssh/sshd_config] at 
/etc/puppet/modules/ssh/manifests/init.pp:16


This is the class I have defined on the puppet server:

class ssh::install {
   package { "openssh":
 ensure => present,
   }
}

class ssh::config {
file { "/etc/ssh/sshd_config":
  ensure => present,
  owner => 'root',
  group => 'root',
  mode => 0600,
  source => "puppet:///modules/ssh/sshd_config",
  require => Class["ssh:install"],
  notify => Class["ssh::service"],
 }
}

class ssh::service {
   service { "sshd":
   ensure => running,
   hasstatus => true,
   hasrestart => true,
   require => Class["ssh::config"],
 }
}

class ssh {
include ssh::install, ssh::config, ssh::service
   }


And this is the definition I tried to copy from the book:


class ssh::install {

  package { "openssh":

  ensure => present,

}

}


class ssh::config {

file { "/etc/ssh/sshd_config":

  ensure = > present,

  owner => 'root',

  group => 'root',

  mode => 0600,

  source => "puppet:///modules/ssh/sshd_config",

  require => Class["ssh::install"],

  notify => Class["ssh::service"],

}

}



class ssh::service {

  service { "sshd":

  ensure => running,

  hasstatus => true,

  hasrestart => true,

  enable => true,

  require => Class["ssh::config"],

  }

}


class ssh {   include ssh::install, ssh::config, ssh::service }



However I can't tell what the differences are that prevent the version 
I keyed in from working. I've even created a diff of the two files 
with the same order of files that you see above (mine first , theirs 
second)




[root@beta:~] #cat ssh_diff.txt

1,5c1,5

< class ssh::install {

 present,

<}

< }

---

> class ssh::install {

>  package { "openssh":

> ensure => present,

>   }

>   }

7,17c7,17

< class ssh::config {

< file { "/etc/ssh/sshd_config":

<   ensure => present,

<   owner => 'root',

<   group => 'root',

<   mode => 0600,

<   source => "puppet:///modules/ssh/sshd_config",

<   require => Class["ssh:install"],

<   notify => Class["ssh::service"],

<  }

< }

---

>   class ssh::config {

>file { "/etc/ssh/sshd_config":

>  ensure = > present,

>  owner => 'root',

>  group => 'root',

>  mode => 0600,

>  source => "puppet:///modules/ssh/sshd_config",

>  require => Class["ssh::install"],

>  notify => Class["ssh::service"],

>   }

>}

19,26d18

< class ssh::service {

 running,

 true,

 true,

 Class["ssh::config"],

<  }

< }

28c20,30

< class ssh { include ssh::install, ssh::config, ssh::service }

---

> class ssh::service {

>  service { "sshd":

>  ensure => running,

>  hasstatus => true,

>  hasrestart => true,

>  enable => true,

>  require => Class["ssh::config"],

>  }

>}

>

> class ssh {   include ssh::install, ssh::config, ssh::service }



 Could I possibly borrow a fresh pair of eyeballs that might be able 
to recognize what's wrong?



Thanks




--
GPG me!!

gpg --keyserver pool.sks-keyservers.net 
 --recv-keys F186197B


--
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/CAOZy0emB1akVKkMv8S5gmtBs_0fatv0E%3DApvh65KhU%3DFtzKxnA%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Johan De Wit

Open Source Consultant

Red Hat Certified E

[Puppet Users] Re: Using Virtual Resources and create_resource combination

2014-01-16 Thread Jose Luis Ledesma
I'm not sure, but I remember reading something like:
create_resources(@user, $myusers)

Although I don't really know if this is the best solution for you

-- 
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/6b995703-6584-485e-8ed5-b165ecbd041f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Optimizing the Puppet CA using Apache

2014-01-16 Thread Erik Dalén
In the simple testing I did I found that they were an order of magnitude
faster. But in general these are requests Puppet only does on the first run
for that host, so it won't be a big speedup of Puppet in general. More like
cutting 0.5 seconds from the first run or so :)

But in our case we wanted to update the CRL when it had changed on the
server, so this allowed us to have a curl with the -z option run before
puppet that downloads it only if it is changed. Puppet itself doesn't
support caching headers, but Apache does of course when serving static
files.

I can see if I can make a proper benchmark though.


On 15 January 2014 09:48, Matthias Saou  wrote:

> On Tue, 14 Jan 2014 16:31:40 +0100
> Erik Dalén  wrote:
>
> > I did a bit of a hack to serve the static files in the Puppet CA
> > directly using Apache instead of going through the Ruby layer and
> > indirector. It speeds things up quite a lot and also allows use of
> > HTTP caching headers like IfModifiedSince etc.
> >
> > So here's some instructions on how to do it:
> > https://gist.github.com/dalen/8419913
> >
> > Works for me, but no guarantees etc :)
>
> This is a simple and interesting change. Care to share some numbers
> about the "speeds things up quite a bit" part? :-)
>
> Matthias
>
> --
> Matthias Saou  ██  ██
>  ██  ██
> Web: http://matthias.saou.eu/  ██
> Mail/XMPP:  matth...@saou.eu   ██  
>██
> GPG: 4096R/E755CC63██  ██  ██
>  8D91 7E2E F048 9C9C 46AF  ██  ██  ██  ██
>  21A9 7A51 7B82 E755 CC63  
>
> --
> 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/20140115094835.28088937%40r2d2.marmotte.net
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Erik Dalén

-- 
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/CAAAzDLej1Xjr-QHwpFcD3QVwxJyL7KbpeDox3A7jT9NAUVsi1w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] People transferring from Brussels to Ghent?

2014-01-16 Thread Daniele Sluijters
Hi everyone,

Seems to be shaping up nicely, we've got 10 people registered for now.
Would be nice if the group grows a bit more but it's a good start.

Johan: Could you ask around a bit about a venue we could crash for
food and drinks? It would be nice if it weren't too far from the Solbosch
campus.

-- 
Daniele Sluijters

On Tuesday, 14 January 2014 17:02:45 UTC+1, Felix.Frank wrote:
>
> On 01/14/2014 04:22 PM, Erik Dalén wrote: 
> > I'll be there (and at puppet camp amsterdam before and cfgmgmt.eu 
> >  the days after). 
> > 
> > Github: https://github.com/dalen/ 
> > 
> > probably won't be wearing the glasses I have on the picture there :) 
>
> I won't be at FOSDEM, but will be landing in Brussels Sunday afternoon 
> and board a train to Ghent near the airport some time around 7 p.m. 
> local time. 
>
> If that coincides with anyone's plans, that would be awesome. 
>
> Regards, 
> Felix 
>

-- 
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/934e7b4e-253d-4056-8ea2-ebec84511da5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Dividing init.pp into components

2014-01-16 Thread David Jarosch
Hey guys,

I'm having some problems dividing my init.pp into components like 
package.pp, config.pp and service.pp. Unfortunately I'm getting several 
error's after running puppet-lint like:

ERROR: nrpe::package not in autoload module layout on line 1
ERROR: nrpe::service not in autoload module layout on line 1
ERROR: Syntax error (try running `puppet parser validate `) on line 3
ERROR: nrpe::config not in autoload module layout on line 1

etc.

Here my code, maybe someone of you can give me a hint where to look at:

*init.pp*

### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
class nrpe {
  class { '::nrpe::package': } ->
  class { '::nrpe::config': }  ->
  class { '::nrpe::service': } ->
  Class['nrpe']
}

*package.pp*

class nrpe::package {
  package { 'nagios-nrpe-server':
ensure  => 'latest',
require => Class['apt::update'],
  }

  ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
  exec { 'nagios-nrpe-plugin':
unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
require => Class['nrpe::package'],
command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
--no-install-recommends';
  }

  ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
  exec { 'nagios-plugins':
unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
require => Class['nrpe::package'],
command => '/usr/bin/apt-get install nagios-plugins -y 
--no-install-recommends';
  }
}

*config.pp*

class nrpe::config {
  file {
'/etc/nagios/nrpe.cfg':
  source=> 'puppet:///modules/nrpe/nrpe.cfg',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0644',
  owner => 'nagios',
  group => 'nagios';

'/etc/init.d/nrpe':
  source=> 'puppet:///modules/nrpe/nrpe_init.d',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'root',
  group => 'root';

'/etc/nagios/nrpe.d/nrpe_all.cfg':
  source=> 'puppet:///modules/nrpe/nrpe_all',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0644',
  owner => 'nagios',
  group => 'nagios';

'/usr/lib/nagios/plugins/check_linux_raid':
  source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'nagios',
  group => 'nagios';

'/usr/lib/nagios/plugins/check_md_raid':
  source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'nagios',
  group => 'nagios';
  }
}

*service.pp*

class nrpe::service {
  service { 'nrpe':
ensure  => running,
enable  => true,
require => Class['nrpe::config'],
  }
}


Folder structure on Puppetmaster:

/etc/puppet/git/modules/nrpe/manifests# tree -d /etc/puppet/git/modules/
/etc/puppet/git/modules/
├── nrpe
│   ├── files
│   │   ├── plugins
│   │   ├── rs0
│   │   ├── rs1
│   │   ├── rs2
│   │   ├── rs3
│   │   └── rs4
│   ├── manifests
│   │   └── Testing
│   ├── spec
│   └── tests

Cheers,
David

-- 
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/e4f6d95e-7f97-4f95-9353-8fca507f7a70%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Dividing init.pp into components

2014-01-16 Thread David Jarosch
BTW: Puppet parser show's following error:

puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
Error: Could not parse for environment production: Could not match 
 '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2

On client machine:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class nrpe

Cheers,
David

-- 
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/7638ca4b-76c0-4876-bc19-f3c2925acc09%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Divide init.pp into components

2014-01-16 Thread David Jarosch
Hey guys,

I'm having some problems dividing my init.pp into components like 
package.pp, config.pp and service.pp. Unfortunately I'm getting several 
error's after running puppet-lint like:

ERROR: nrpe::package not in autoload module layout on line 1
ERROR: nrpe::service not in autoload module layout on line 1
ERROR: Syntax error (try running `puppet parser validate `) on line 3
ERROR: nrpe::config not in autoload module layout on line 1

etc.

Puppet parser show's following error:

puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
Error: Could not parse for environment production: Could not match 
 '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2

On client machine:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class nrpe

Here my code, maybe someone of you can give me a hint where to look at:

*init.pp*

### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
class nrpe {
  class { '::nrpe::package': } ->
  class { '::nrpe::config': }  ->
  class { '::nrpe::service': } ->
  Class['nrpe']
}

*package.pp*

class nrpe::package {
  package { 'nagios-nrpe-server':
ensure  => 'latest',
require => Class['apt::update'],
  }

  ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
  exec { 'nagios-nrpe-plugin':
unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
require => Class['nrpe::package'],
command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
--no-install-recommends';
  }

  ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
  exec { 'nagios-plugins':
unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
require => Class['nrpe::package'],
command => '/usr/bin/apt-get install nagios-plugins -y 
--no-install-recommends';
  }
}

*config.pp*

class nrpe::config {
  file {
'/etc/nagios/nrpe.cfg':
  source=> 'puppet:///modules/nrpe/nrpe.cfg',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0644',
  owner => 'nagios',
  group => 'nagios';

'/etc/init.d/nrpe':
  source=> 'puppet:///modules/nrpe/nrpe_init.d',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'root',
  group => 'root';

'/etc/nagios/nrpe.d/nrpe_all.cfg':
  source=> 'puppet:///modules/nrpe/nrpe_all',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0644',
  owner => 'nagios',
  group => 'nagios';

'/usr/lib/nagios/plugins/check_linux_raid':
  source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'nagios',
  group => 'nagios';

'/usr/lib/nagios/plugins/check_md_raid':
  source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
  require   => Class['nrpe::package'],
  notify=> Class['nrpe::service'],
  mode  => '0755',
  owner => 'nagios',
  group => 'nagios';
  }
}

*service.pp*

class nrpe::service {
  service { 'nrpe':
ensure  => running,
enable  => true,
require => Class['nrpe::config'],
  }
}

*Folderstructure on Puppetmaster:*

/etc/puppet/git/modules/nrpe/manifests# tree -d /etc/puppet/git/modules/
/etc/puppet/git/modules/
├── nrpe
│   ├── files
│   │   ├── nrpe_all
│   │   ├── nrpe_cache.cfg
│   │   ├── nrpe.cfg
│   │   ├── nrpe_init.d
│   │   ├── nrpe_var
│   │   ├── plugins
│   │   │   ├── check_linux_raid
│   │   │   ├── check_md_raid
│   │   │   ├── check_memcached.pl
│   │   │   └── check_mongodb.py
│   ├── manifests
│   │   ├── config.pp
│   │   ├── init.pp
│   │   ├── package.pp
│   │   ├── service.pp
│   ├── Modulefile
│   ├── README
│   ├── spec
│   │   └── spec_helper.rb
│   └── tests
│   └── init.pp


Cheers,
David

-- 
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/d913d604-23d3-4a26-b35e-3f5d63386f5d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ssh module dependency failure

2014-01-16 Thread Andrea Cappelli

Il 16/01/2014 06:25, Tim Dunphy ha scritto:

Hi All,

[]

err: Failed to apply catalog: Could not find dependency 
Class[Ssh:install] for File[/etc/ssh/sshd_config] at 
/etc/puppet/modules/ssh/manifests/init.pp:16

[...]

class ssh::config {
file { "/etc/ssh/sshd_config":
  ensure => present,
  owner => 'root',
  group => 'root',
  mode => 0600,
  source => "puppet:///modules/ssh/sshd_config",
  require => Class["ssh:install"],
  notify => Class["ssh::service"],
 }
}



Hi,
I suppose you have to use require => Class["ssh::install"] instead of 
require => Class["ssh:install"] (double ::)


HTH

--
Andrea Cappelli

--
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/52D77454.1020906%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppet user context

2014-01-16 Thread Robert Turk

Good morning,

I have a question concerning puppet and modifying user data. I am on Mac 
OS X 10.8.5 with puppet 3.4.2.

I would like to run a manifest with the following content:

file { "/Users/${id}/Desktop/testfile":
ensure => file,
}
file { "/usr/testfile":
ensure => file,
}

For this manifest you need root access and you have to know the current 
logged in user.
But the fact $id is, of course, "root" because I have to run this 
manifest as root.


So how can I get the current logged in user as a variable?

Thanks in advance.

Kind regards.
Robert

--
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/52D7866A.1040909%40reproflex.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] People transferring from Brussels to Ghent?

2014-01-16 Thread Johan De Wit

I passed the mail to the user groups members.
But as usual, i think everything around the solbosch campus will be 
filled up to the roof :)


Keep you posted ...




On 01/16/2014 12:01 PM, Daniele Sluijters wrote:

Hi everyone,

Seems to be shaping up nicely, we've got 10 people registered for now.
Would be nice if the group grows a bit more but it's a good start.

Johan: Could you ask around a bit about a venue we could crash for
food and drinks? It would be nice if it weren't too far from the Solbosch
campus.

--
Daniele Sluijters

On Tuesday, 14 January 2014 17:02:45 UTC+1, Felix.Frank wrote:

On 01/14/2014 04:22 PM, Erik Dalén wrote:
> I'll be there (and at puppet camp amsterdam before and
cfgmgmt.eu 
>  the days after).
>
> Github: https://github.com/dalen/
>
> probably won't be wearing the glasses I have on the picture
there :)

I won't be at FOSDEM, but will be landing in Brussels Sunday
afternoon
and board a train to Ghent near the airport some time around 7 p.m.
local time.

If that coincides with anyone's plans, that would be awesome.

Regards,
Felix

--
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/934e7b4e-253d-4056-8ea2-ebec84511da5%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP006)
_
 
Open-Future Phone +32 (0)2/255 70 70

Zavelstraat 72  Fax   +32 (0)2/255 70 71
3071 KORTENBERG Mobile+32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_
 



Next Events:
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february
Puppet Intruction Course | 
http://www.open-future.be/puppet-introduction-course-7th-february
Zabbix Certified Training | 
http://www.open-future.be/zabbix-certified-training-10-till-12th-february
Zabbix for Large Environments Training | 
http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
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/52D7C811.9050801%40open-future.be.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppetboard 0.0.3 / pypuppetdb 0.1.0

2014-01-16 Thread Daniele Sluijters
Hi everyone,

It's taken longer than I would have liked but, it's that time of the season 
again.

## Releases
pypuppetdb 0.1.0 is now available on PyPi[1] and updated docs have been 
posted to Read The Docs[2].

[1]: https://pypi.python.org/pypi/pypuppetdb
[2]: http://pypuppetdb.readthedocs.org/en/v0.1.0/

The README and CHANGELOG should provide adequate information on what's 
changed. It's nothing
terribly major except for the SSL settings and behaviour which has been 
slightly changed and almost
complete support for v3. All the endpoints are supported, just not all the 
features.

Of far greater note is the release of Puppetboard 0.0.3. There have been 
plenty of changes over the
past few months. Since a lot of people have been running from source and 
pulling in changes regularly
the changes won't be that obvious but if you were running from a 'release' 
you're in for a party. I suggest
you have a look around the screenshots at available at the Github 
repository[3].

Up to now it's been a slight pain to install Puppetboard and get it 
running. As per 0.0.3 Puppetboard is
now packaged and available on PyPi, a simple `pip install puppetboard` is 
all it takes. The README has
received extensive updates with regard to how you configure Puppetboard and 
your webserver. Because
for some unknown reason PyPI has decided to not render my README as HTML 
but in stead serve up
the raw ReStructuredText you're better off using the Github[3] repository 
to browse the README.

[3]: https://github.com/nedap/puppetboard

## Future plans
I promised native packages for both pypuppetdb and Puppetboard a while ago. 
Packages for pypuppetdb
will hopefully be released in time for FOSDEM for Debian/Ubuntu and likely 
CentOS. Packages for
Puppetboard take a bit more doing as most distributions don't ship the 
dependencies we require.

As noted in pypuppetdb's README, 0.2.x series will drop support for API v3, 
so PuppetDB prior to 1.5.
This is also partially due to internal surgery that needs to happen to 
nicely support query pagination and
a few other long-standing feature requests.

Enjoy and as usual you can contact me or join #puppetboard for any help.

-- 
Daniele Sluijters

-- 
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/a53fc694-c51f-450e-813c-34e5e3f732ea%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread Gavin Williams
David

Module layout looks ok from the above... 

It's probably worth checking what your puppet master modulepath is set to 
in puppet.conf, as notice you're using /etc/puppet/git/modules, rather than 
the normal /etc/puppet/modules. 

HTH
Gavin 

On Thursday, 16 January 2014 11:16:02 UTC, David Jarosch wrote:
>
> Hey guys,
>
> I'm having some problems dividing my init.pp into components like 
> package.pp, config.pp and service.pp. Unfortunately I'm getting several 
> error's after running puppet-lint like:
>
> ERROR: nrpe::package not in autoload module layout on line 1
> ERROR: nrpe::service not in autoload module layout on line 1
> ERROR: Syntax error (try running `puppet parser validate `) on line 3
> ERROR: nrpe::config not in autoload module layout on line 1
>
> etc.
>
> Puppet parser show's following error:
>
> puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
> Error: Could not parse for environment production: Could not match 
>  '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2
>
> On client machine:
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class nrpe
>
> Here my code, maybe someone of you can give me a hint where to look at:
>
> *init.pp*
>
> ### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
> class nrpe {
>   class { '::nrpe::package': } ->
>   class { '::nrpe::config': }  ->
>   class { '::nrpe::service': } ->
>   Class['nrpe']
> }
>
> *package.pp*
>
> class nrpe::package {
>   package { 'nagios-nrpe-server':
> ensure  => 'latest',
> require => Class['apt::update'],
>   }
>
>   ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>   exec { 'nagios-nrpe-plugin':
> unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
> require => Class['nrpe::package'],
> command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
> --no-install-recommends';
>   }
>
>   ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>   exec { 'nagios-plugins':
> unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
> require => Class['nrpe::package'],
> command => '/usr/bin/apt-get install nagios-plugins -y 
> --no-install-recommends';
>   }
> }
>
> *config.pp*
>
> class nrpe::config {
>   file {
> '/etc/nagios/nrpe.cfg':
>   source=> 'puppet:///modules/nrpe/nrpe.cfg',
>   require   => Class['nrpe::package'],
>   notify=> Class['nrpe::service'],
>   mode  => '0644',
>   owner => 'nagios',
>   group => 'nagios';
>
> '/etc/init.d/nrpe':
>   source=> 'puppet:///modules/nrpe/nrpe_init.d',
>   require   => Class['nrpe::package'],
>   notify=> Class['nrpe::service'],
>   mode  => '0755',
>   owner => 'root',
>   group => 'root';
>
> '/etc/nagios/nrpe.d/nrpe_all.cfg':
>   source=> 'puppet:///modules/nrpe/nrpe_all',
>   require   => Class['nrpe::package'],
>   notify=> Class['nrpe::service'],
>   mode  => '0644',
>   owner => 'nagios',
>   group => 'nagios';
>
> '/usr/lib/nagios/plugins/check_linux_raid':
>   source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
>   require   => Class['nrpe::package'],
>   notify=> Class['nrpe::service'],
>   mode  => '0755',
>   owner => 'nagios',
>   group => 'nagios';
>
> '/usr/lib/nagios/plugins/check_md_raid':
>   source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
>   require   => Class['nrpe::package'],
>   notify=> Class['nrpe::service'],
>   mode  => '0755',
>   owner => 'nagios',
>   group => 'nagios';
>   }
> }
>
> *service.pp*
>
> class nrpe::service {
>   service { 'nrpe':
> ensure  => running,
> enable  => true,
> require => Class['nrpe::config'],
>   }
> }
>
> *Folderstructure on Puppetmaster:*
>
> /etc/puppet/git/modules/nrpe/manifests# tree -d /etc/puppet/git/modules/
> /etc/puppet/git/modules/
> ├── nrpe
> │   ├── files
> │   │   ├── nrpe_all
> │   │   ├── nrpe_cache.cfg
> │   │   ├── nrpe.cfg
> │   │   ├── nrpe_init.d
> │   │   ├── nrpe_var
> │   │   ├── plugins
> │   │   │   ├── check_linux_raid
> │   │   │   ├── check_md_raid
> │   │   │   ├── check_memcached.pl
> │   │   │   └── check_mongodb.py
> │   ├── manifests
> │   │   ├── config.pp
> │   │   ├── init.pp
> │   │   ├── package.pp
> │   │   ├── service.pp
> │   ├── Modulefile
> │   ├── README
> │   ├── spec
> │   │   └── spec_helper.rb
> │   └── tests
> │   └── init.pp
>
>
> Cheers,
> David
>

-- 
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/ffd8b23f-6b63-4772-8c97-9b5917d6da0e

[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread David Jarosch
Hey Gavin,

thanks for your reply. The modulepath on puppetmaster should be fine:

*/etc/puppet/puppet.conf*

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
manifestdir = /etc/puppet/git/manifests
modulepath = /etc/puppet/git/modules

Cheers,
David

Am Donnerstag, 16. Januar 2014 13:20:15 UTC+1 schrieb Gavin Williams:
>
> David
>
> Module layout looks ok from the above... 
>
> It's probably worth checking what your puppet master modulepath is set to 
> in puppet.conf, as notice you're using /etc/puppet/git/modules, rather than 
> the normal /etc/puppet/modules. 
>
> HTH
> Gavin 
>
> On Thursday, 16 January 2014 11:16:02 UTC, David Jarosch wrote:
>>
>> Hey guys,
>>
>> I'm having some problems dividing my init.pp into components like 
>> package.pp, config.pp and service.pp. Unfortunately I'm getting several 
>> error's after running puppet-lint like:
>>
>> ERROR: nrpe::package not in autoload module layout on line 1
>> ERROR: nrpe::service not in autoload module layout on line 1
>> ERROR: Syntax error (try running `puppet parser validate `) on line 
>> 3
>> ERROR: nrpe::config not in autoload module layout on line 1
>>
>> etc.
>>
>> Puppet parser show's following error:
>>
>> puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
>> Error: Could not parse for environment production: Could not match 
>>  '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2
>>
>> On client machine:
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Could not find class nrpe
>>
>> Here my code, maybe someone of you can give me a hint where to look at:
>>
>> *init.pp*
>>
>> ### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
>> class nrpe {
>>   class { '::nrpe::package': } ->
>>   class { '::nrpe::config': }  ->
>>   class { '::nrpe::service': } ->
>>   Class['nrpe']
>> }
>>
>> *package.pp*
>>
>> class nrpe::package {
>>   package { 'nagios-nrpe-server':
>> ensure  => 'latest',
>> require => Class['apt::update'],
>>   }
>>
>>   ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>   exec { 'nagios-nrpe-plugin':
>> unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
>> require => Class['nrpe::package'],
>> command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
>> --no-install-recommends';
>>   }
>>
>>   ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>   exec { 'nagios-plugins':
>> unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
>> require => Class['nrpe::package'],
>> command => '/usr/bin/apt-get install nagios-plugins -y 
>> --no-install-recommends';
>>   }
>> }
>>
>> *config.pp*
>>
>> class nrpe::config {
>>   file {
>> '/etc/nagios/nrpe.cfg':
>>   source=> 'puppet:///modules/nrpe/nrpe.cfg',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0644',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/etc/init.d/nrpe':
>>   source=> 'puppet:///modules/nrpe/nrpe_init.d',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'root',
>>   group => 'root';
>>
>> '/etc/nagios/nrpe.d/nrpe_all.cfg':
>>   source=> 'puppet:///modules/nrpe/nrpe_all',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0644',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/usr/lib/nagios/plugins/check_linux_raid':
>>   source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/usr/lib/nagios/plugins/check_md_raid':
>>   source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'nagios',
>>   group => 'nagios';
>>   }
>> }
>>
>> *service.pp*
>>
>> class nrpe::service {
>>   service { 'nrpe':
>> ensure  => running,
>> enable  => true,
>> require => Class['nrpe::config'],
>>   }
>> }
>>
>> *Folderstructure on Puppetmaster:*
>>
>> /etc/puppet/git/modules/nrpe/manifests# tree -d /etc/puppet/git/modules/
>> /etc/puppet/git/modules/
>> ├── nrpe
>> │   ├── files
>> │   │   ├── nrpe_all
>> │   │   ├── nrpe_cache.cfg
>> │   │   ├── nrpe.cfg
>> │   │   ├── nrpe_init.d
>> │   │   ├── nrpe_var
>> │   │   ├── plugins
>> │   │   │   ├── check_linux_raid
>> │   │   │   ├── check_md_raid
>> │   │   │   ├── check_memcached.pl
>> │   │   │   └── check_mongodb.py
>> │   ├── manifest

[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread David Jarosch
Hey Gavin,

thanks for your reply. The modulepath on puppetmaster should be fine:

*/etc/puppet/puppet.conf*

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
manifestdir = /etc/puppet/git/manifests
modulepath = /etc/puppet/git/modules

Cheers,
David

Am Donnerstag, 16. Januar 2014 13:20:15 UTC+1 schrieb Gavin Williams:
>
> David
>
> Module layout looks ok from the above... 
>
> It's probably worth checking what your puppet master modulepath is set to 
> in puppet.conf, as notice you're using /etc/puppet/git/modules, rather than 
> the normal /etc/puppet/modules. 
>
> HTH
> Gavin 
>
> On Thursday, 16 January 2014 11:16:02 UTC, David Jarosch wrote:
>>
>> Hey guys,
>>
>> I'm having some problems dividing my init.pp into components like 
>> package.pp, config.pp and service.pp. Unfortunately I'm getting several 
>> error's after running puppet-lint like:
>>
>> ERROR: nrpe::package not in autoload module layout on line 1
>> ERROR: nrpe::service not in autoload module layout on line 1
>> ERROR: Syntax error (try running `puppet parser validate `) on line 
>> 3
>> ERROR: nrpe::config not in autoload module layout on line 1
>>
>> etc.
>>
>> Puppet parser show's following error:
>>
>> puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
>> Error: Could not parse for environment production: Could not match 
>>  '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2
>>
>> On client machine:
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Could not find class nrpe
>>
>> Here my code, maybe someone of you can give me a hint where to look at:
>>
>> *init.pp*
>>
>> ### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
>> class nrpe {
>>   class { '::nrpe::package': } ->
>>   class { '::nrpe::config': }  ->
>>   class { '::nrpe::service': } ->
>>   Class['nrpe']
>> }
>>
>> *package.pp*
>>
>> class nrpe::package {
>>   package { 'nagios-nrpe-server':
>> ensure  => 'latest',
>> require => Class['apt::update'],
>>   }
>>
>>   ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>   exec { 'nagios-nrpe-plugin':
>> unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
>> require => Class['nrpe::package'],
>> command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
>> --no-install-recommends';
>>   }
>>
>>   ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>   exec { 'nagios-plugins':
>> unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
>> require => Class['nrpe::package'],
>> command => '/usr/bin/apt-get install nagios-plugins -y 
>> --no-install-recommends';
>>   }
>> }
>>
>> *config.pp*
>>
>> class nrpe::config {
>>   file {
>> '/etc/nagios/nrpe.cfg':
>>   source=> 'puppet:///modules/nrpe/nrpe.cfg',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0644',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/etc/init.d/nrpe':
>>   source=> 'puppet:///modules/nrpe/nrpe_init.d',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'root',
>>   group => 'root';
>>
>> '/etc/nagios/nrpe.d/nrpe_all.cfg':
>>   source=> 'puppet:///modules/nrpe/nrpe_all',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0644',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/usr/lib/nagios/plugins/check_linux_raid':
>>   source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'nagios',
>>   group => 'nagios';
>>
>> '/usr/lib/nagios/plugins/check_md_raid':
>>   source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
>>   require   => Class['nrpe::package'],
>>   notify=> Class['nrpe::service'],
>>   mode  => '0755',
>>   owner => 'nagios',
>>   group => 'nagios';
>>   }
>> }
>>
>> *service.pp*
>>
>> class nrpe::service {
>>   service { 'nrpe':
>> ensure  => running,
>> enable  => true,
>> require => Class['nrpe::config'],
>>   }
>> }
>>
>> *Folderstructure on Puppetmaster:*
>>
>> /etc/puppet/git/modules/nrpe/manifests# tree -d /etc/puppet/git/modules/
>> /etc/puppet/git/modules/
>> ├── nrpe
>> │   ├── files
>> │   │   ├── nrpe_all
>> │   │   ├── nrpe_cache.cfg
>> │   │   ├── nrpe.cfg
>> │   │   ├── nrpe_init.d
>> │   │   ├── nrpe_var
>> │   │   ├── plugins
>> │   │   │   ├── check_linux_raid
>> │   │   │   ├── check_md_raid
>> │   │   │   ├── check_memcached.pl
>> │   │   │   └── check_mongodb.py
>> │   ├── manifest

[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread Gavin Williams
Ah, just spotted what might be another issue in your init.pp file:
---
### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
class nrpe {
  class { '::nrpe::package': } ->
  class { '::nrpe::config': }  ->
  class { '::nrpe::service': } ->
  Class['nrpe']
}
---
Try dropping "Class['nrpe']", as dont think it's needed, and could quite 
possibly end-up causing a cyclical dependency... Albeit that's not the 
error your client is seeing :s

Cheers
Gavin 

On Thursday, 16 January 2014 12:25:13 UTC, David Jarosch wrote:
>
> Hey Gavin,
>
> thanks for your reply. The modulepath on puppetmaster should be fine:
>
> */etc/puppet/puppet.conf*
>
> [main]
> logdir=/var/log/puppet
> vardir=/var/lib/puppet
> ssldir=/var/lib/puppet/ssl
> rundir=/var/run/puppet
> factpath=$vardir/lib/facter
> templatedir=$confdir/templates
> manifestdir = /etc/puppet/git/manifests
> modulepath = /etc/puppet/git/modules
>
> Cheers,
> David
>
> Am Donnerstag, 16. Januar 2014 13:20:15 UTC+1 schrieb Gavin Williams:
>>
>> David
>>
>> Module layout looks ok from the above... 
>>
>> It's probably worth checking what your puppet master modulepath is set to 
>> in puppet.conf, as notice you're using /etc/puppet/git/modules, rather than 
>> the normal /etc/puppet/modules. 
>>
>> HTH
>> Gavin 
>>
>> On Thursday, 16 January 2014 11:16:02 UTC, David Jarosch wrote:
>>>
>>> Hey guys,
>>>
>>> I'm having some problems dividing my init.pp into components like 
>>> package.pp, config.pp and service.pp. Unfortunately I'm getting several 
>>> error's after running puppet-lint like:
>>>
>>> ERROR: nrpe::package not in autoload module layout on line 1
>>> ERROR: nrpe::service not in autoload module layout on line 1
>>> ERROR: Syntax error (try running `puppet parser validate `) on 
>>> line 3
>>> ERROR: nrpe::config not in autoload module layout on line 1
>>>
>>> etc.
>>>
>>> Puppet parser show's following error:
>>>
>>> puppet parser validate /etc/puppet/git/modules/nrpe/manifests/init.pp
>>> Error: Could not parse for environment production: Could not match 
>>>  '::nrpe::package': at /etc/puppet/git/modules/nrpe/manifests/init.pp:2
>>>
>>> On client machine:
>>>
>>> Error: Could not retrieve catalog from remote server: Error 400 on 
>>> SERVER: Could not find class nrpe
>>>
>>> Here my code, maybe someone of you can give me a hint where to look at:
>>>
>>> *init.pp*
>>>
>>> ### INSTALLS NRPE INCLUDING DEFINING SERVER AND SETTING UP PLUGINS ###
>>> class nrpe {
>>>   class { '::nrpe::package': } ->
>>>   class { '::nrpe::config': }  ->
>>>   class { '::nrpe::service': } ->
>>>   Class['nrpe']
>>> }
>>>
>>> *package.pp*
>>>
>>> class nrpe::package {
>>>   package { 'nagios-nrpe-server':
>>> ensure  => 'latest',
>>> require => Class['apt::update'],
>>>   }
>>>
>>>   ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>>   exec { 'nagios-nrpe-plugin':
>>> unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
>>> require => Class['nrpe::package'],
>>> command => '/usr/bin/apt-get install nagios-nrpe-plugin -y 
>>> --no-install-recommends';
>>>   }
>>>
>>>   ### INSTALL ICINGA PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
>>>   exec { 'nagios-plugins':
>>> unless  => '/usr/bin/dpkg -l |grep nagios-plugins',
>>> require => Class['nrpe::package'],
>>> command => '/usr/bin/apt-get install nagios-plugins -y 
>>> --no-install-recommends';
>>>   }
>>> }
>>>
>>> *config.pp*
>>>
>>> class nrpe::config {
>>>   file {
>>> '/etc/nagios/nrpe.cfg':
>>>   source=> 'puppet:///modules/nrpe/nrpe.cfg',
>>>   require   => Class['nrpe::package'],
>>>   notify=> Class['nrpe::service'],
>>>   mode  => '0644',
>>>   owner => 'nagios',
>>>   group => 'nagios';
>>>
>>> '/etc/init.d/nrpe':
>>>   source=> 'puppet:///modules/nrpe/nrpe_init.d',
>>>   require   => Class['nrpe::package'],
>>>   notify=> Class['nrpe::service'],
>>>   mode  => '0755',
>>>   owner => 'root',
>>>   group => 'root';
>>>
>>> '/etc/nagios/nrpe.d/nrpe_all.cfg':
>>>   source=> 'puppet:///modules/nrpe/nrpe_all',
>>>   require   => Class['nrpe::package'],
>>>   notify=> Class['nrpe::service'],
>>>   mode  => '0644',
>>>   owner => 'nagios',
>>>   group => 'nagios';
>>>
>>> '/usr/lib/nagios/plugins/check_linux_raid':
>>>   source=> 'puppet:///modules/nrpe/plugins/check_linux_raid',
>>>   require   => Class['nrpe::package'],
>>>   notify=> Class['nrpe::service'],
>>>   mode  => '0755',
>>>   owner => 'nagios',
>>>   group => 'nagios';
>>>
>>> '/usr/lib/nagios/plugins/check_md_raid':
>>>   source=> 'puppet:///modules/nrpe/plugins/check_md_raid',
>>>   require   => Class['nrpe::package'],
>>>   notify=> Class['nrpe::service'],
>>>   mode  => '0755',
>>>   owner => 'nagios',
>>>   group => 'nagios

Re: [Puppet Users] getting error on puppet plugin download

2014-01-16 Thread Felix Frank
Hi,

examine the logs on the puppetmaster, there will hopefully be more
information on why the request was denied.

Guessing blindly, you may have to scrutinize your auth.conf file.

HTH,
Felix

On 01/07/2014 10:12 PM, Bhavin Shah wrote:
> Hi,
>  I am getting the following error when i execute "puppet plugin download"
> 
> root@osbuild:/etc/puppet/manifests# puppet plugin download
> err: /File[/var/lib/puppet/lib]: Failed to generate additional resources
> using 'eval_generate: Error 403 on SERVER: Forbidden request:
> osbuild.iplabs.att.com(192.xxx.yyy.106) access to /file_metadata/plugins
> [search] at line 99
> err: /File[/var/lib/puppet/lib]: Could not evaluate: Error 403 on
> SERVER: Forbidden request: osbuild.iplabs.att.com(192.xxx.yyy106) access
> to /file_metadata/plugins [find] at line 99 Could not retrieve file
> metadata for puppet://osbuild.iplabs.att.com/plugins: Error 403 on
> SERVER: Forbidden request: osbuild.iplabs.att.com(192.xxx.yyy.106)
> access to /file_metadata/plugins [find] at line 99
> No plugins downloaded.
> 
> 
> How do i resolve this ?
> 
> Thanks
> Bhavin

-- 
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/52D7D236.10408%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet user context

2014-01-16 Thread Andrey Kozichev
Do you need to run this only for logged in users?
You can use facter fact to return logged in users and use it in your
manifest.

Andrey


On 16 January 2014 07:12, Robert Turk  wrote:

> Good morning,
>
> I have a question concerning puppet and modifying user data. I am on Mac
> OS X 10.8.5 with puppet 3.4.2.
> I would like to run a manifest with the following content:
>
> file { "/Users/${id}/Desktop/testfile":
> ensure => file,
> }
> file { "/usr/testfile":
> ensure => file,
> }
>
> For this manifest you need root access and you have to know the current
> logged in user.
> But the fact $id is, of course, "root" because I have to run this manifest
> as root.
>
> So how can I get the current logged in user as a variable?
>
> Thanks in advance.
>
> Kind regards.
> Robert
>
> --
> 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/52D7866A.1040909%40reproflex.de.
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFe_FOztMPgtqm2-aWWJmB37oi%2BRgGSS26gpa2OKQYMirQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread David Jarosch
Unfortunately this didn't solve the problem. Maybe it help's to see how I'm 
including the modules. I have an origin.pp file 
/etc/puppet/git/manifests/origin.pp which include modules, that are used by 
all of my servers:

### BASE DEFINITION WHICH ALL OTHER NODES INHERITS FROM ###
node 'origin' {
  include aliases
  include apt
  include apt::update
  include base
  include cron
  include exim
  include fail2ban
  include logrotate
  include monit
  include monit::logstash
  include motd
*  include nrpe*
  class { 'ntp':
server  => 'de.pool.ntp.org',
  }
  include ssh
  include sudo
  include puppet
  include puppet::client
  include user
  include vim
}

Then I define node's which inherits from origin:

# APP SERVER #
node  'app1...',
  'app2...'
   'app3...'
   'app4...'
   'app5...' inherits 'origin' {
  include apt::deb6
  include base::extended
  include cron::app
  include daemontools::app
  include infrastructure
  include logrotate::nginx_json
  include logstash::app
  include mongodb::app
  include monit::app
  include nginx
  include openx
  include php5::app
  include subversion::app
}

Maybe this will clear up the problem.

Cheers,
David

-- 
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/8e4a7f86-9a3a-44ee-b72d-93015e3e35bf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] rspec-puppet: mocking included params class in defines

2014-01-16 Thread Gavin Williams
Vamsee 

Are you able to share how you went about mocking out the ::params class 
include? 

As I've got the same pattern that I want to test using rspec-puppet... 

Cheers
Gavin 

On Friday, 27 December 2013 10:16:49 UTC, Vamsee Kanakala wrote:
>
> On Dec 26 10:56, Johan De Wit wrote: 
> > I use this one to set parameters for a define in my rspec 
> > 
> >   let(:facts) { { :hostname => 'sambaserver' } } 
> > 
> >   context 'default setting' do 
> > let(:params) { { :share_path => '/testpath/share' } } 
> > ... 
> >   end 
> > 
>
> Thanks a bunch Johan, that gave me some ideas. I was able to rewrite 
> my tests successfully based on your pattern. 
>
>
> Vamsee. 
>

-- 
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/b0d4f0e8-67c3-4e87-923f-da7f9d44df68%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] MSSQL Server 2012

2014-01-16 Thread Helen
Hi,

I managed to get SQL server 2008 R2 install with puppet by using the 
puppet windows_package module 


https://forge.puppetlabs.com/reidmv/windows_package 
(now builtin to puppet 3.4.2 )




class windows_package {
  
   windows_package { 'Microsoft SQL Server 2008 R2 (64-bit)':
  ensure  => installed,
 source  => '\\myfileserver\Install\SQL Server 2008 R2
\Developer Edition with SP2\setup.exe',
  install_options =>
['/q', '/SAPWD="password"', '/configurationfile=\\myfileserver\Install\SQL 
Server 2008 R2\Developer Edition with SP2\ConfigurationFile.ini'],

   
}
}


This installs succesfully, but i need to add the reboot module as SQL 
won't install if the machine is pending a reboot.

I would also like to test the new exit code in the later version of sql.




Thanks

Helen





-- 
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/loom.20140116T150544-989%40post.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] rspec-puppet: mocking included params class in defines

2014-01-16 Thread Vamsee Kanakala
On Jan 16 04:58, Gavin Williams wrote:
> Vamsee 
> 
> Are you able to share how you went about mocking out the ::params class 
> include? 
> 
> As I've got the same pattern that I want to test using rspec-puppet... 
> 

Hi Gavin,

I ended up adding all the params to the define explicity, instead of
including the params class:

define app_setup::app(
  $app_name   = $title,
  $app_host   = $app_setup::params::app_hosts[$title]['url'],
  $app_port   = $app_setup::params::app_hosts[$title]['port'],
  $deploy_user= $app_setup::params::deploy_user,
  ...
)

The params are accessible in the define without inheriting because I did this 
in the
init.pp file:

class app_setup($deploy_env = 'UNSET')  {
  include app_setup::params
  ...
}

And testing it the usual way:

let(:params) { {
:app_host=> 'api.example.net',
:app_port=> '3009',
:deploy_user => 'test_user',
...
}}

Hope this helps. I thought this was much cleaner in its contract rather than 
including
the params class. This might or might not appeal to you, though.


Vamsee.

-- 
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/20140116144637.GA17935%40inara.serenity.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread David Jarosch
Sorry,

but I'm a little bit pissed off. It seem's that this problem is caused by 
my keyboard and some kind of keyboard char coding/interpreting or 
something. This char ' was somehow interpreted different then in the Pro 
Puppet 2nd edition book which also look's exactly the same! I've copied 
this character ( ' ) from the book and pasted it in my manifest and voila, 
it worked!

Sorry for wasting your time, but this is ridiculous and time wasting for me 
too :(

Cheers,
David

-- 
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/5df77b56-926c-468b-b600-bd3e50f9ab6f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ssh module dependency failure

2014-01-16 Thread Tim Dunphy
Hey guys,

OK, thanks! So I solved the type-o with the one ':' in the file definition
and separated the classes out into 4 different files:

showing init.pp

class ssh {  include ssh::install, ssh::config, ssh::service }


showing config.pp

class ssh::config {
   file { "/etc/ssh/sshd_config":
 ensure = > present,
 owner => 'root',
 group => 'root',
 mode => 0600,
 source => "puppet:///modules/ssh/sshd_config",
 require => Class["ssh::install"],
 notify => Class["ssh::service"],
  }


showing install.pp

class ssh::install {
 package { "openssh":
ensure => present,
  }
  }


And finally  showing service.pp

class ssh::service {
 service { "sshd":
 ensure => running,
 hasstatus => true,
 hasrestart => true,
 enable => true,
 require => Class["ssh::config"],
 }
   }
   }


They manifests are all located in the following directory with this
ownership and permissions:

root@puppet:/etc/puppet/modules/ssh/manifests] #ls -l
/etc/puppet/modules/ssh/manifests/
total 16
-rw-r--r-- 1 puppet puppet 395 Jan 16 10:00 config.pp
-rw-r--r-- 1 puppet puppet  63 Jan 16 09:59 init.pp
-rw-r--r-- 1 puppet puppet 104 Jan 16 10:00 install.pp
-rw-r--r-- 1 puppet puppet 191 Jan 16 10:01 service.pp

But now when I run the puppet command I get the following error saying that
puppet can't find the 'ssh class':


[root@beta:~] #puppet agent --test --server puppet.mydomain.com
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class ssh::install for beta.jokefire.com on node
beta.mydomain.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

This is how my node definitions look:

node 'base' {
 include  bash, sudo, puppet, ca
}

node 'webserver' inherits 'base' {
 include   web
}

node 'beta.mydomain.com' inherits 'webserver'  {
 include mysql, cassandra, mongo, memcached, proftpd, ssh
}

Any ideas why this error is now occurring?

Thanks
Tim


On Thu, Jan 16, 2014 at 12:55 AM, Andrea Cappelli wrote:

> Il 16/01/2014 06:25, Tim Dunphy ha scritto:
>
>> Hi All,
>>
>> []
>>
>>
>> err: Failed to apply catalog: Could not find dependency
>> Class[Ssh:install] for File[/etc/ssh/sshd_config] at
>> /etc/puppet/modules/ssh/manifests/init.pp:16
>> [...]
>>
>>
>> class ssh::config {
>> file { "/etc/ssh/sshd_config":
>>   ensure => present,
>>   owner => 'root',
>>   group => 'root',
>>   mode => 0600,
>>   source => "puppet:///modules/ssh/sshd_config",
>>   require => Class["ssh:install"],
>>   notify => Class["ssh::service"],
>>  }
>> }
>>
>>
> Hi,
> I suppose you have to use require => Class["ssh::install"] instead of
> require => Class["ssh:install"] (double ::)
>
> HTH
>
> --
> Andrea Cappelli
>
>
> --
> 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/52D77454.1020906%40gmail.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0emD5cmm8FzBYz1QmERX6%3DxdadsGRRfzzjCgsm2etJ4-eg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using Virtual Resources and create_resource combination

2014-01-16 Thread jcbollinger


On Wednesday, January 15, 2014 9:57:41 PM UTC-6, CD wrote:
>
> Hi friends,
>
> I have an issue where that I receive error Error 400 on SERVER: Cannot 
> reassign variable name on node app1. When I run the agent on admin1 it 
> works fine, but when I run the agent on app1 it give me the error.
>
> Having read few forum posts it seems this is most likely that the same 
> resource is used. resource network::if::static is used with eth0 in the 
> same class when it runs for admin1 and app1. I believe when it run on 
> admin1 variables are used without any problem and when it run on app1 it 
> find the variable has been used for admin1.
>


No.  Puppet is complaining about a *variable*, not a resource.  That is, 
something of the general form

$some_var = 'a value'

Each variable may be assigned a value at most once.  There are two likely 
scenarios for how this might be happening:

   1. Most likely, you have a reassignment of the affected variable inside 
   a conditional statement, such that it is processed for node app1 but not 
   for node admin1.
   2. Alternatively, you may have a global variable assignment at top scope 
   in a manifest file that is not loaded for node admin1, but is loaded for 
   node app1.  Such an assignment in principle applies to all nodes (and 
   therefore is wrong for all nodes), but it won't be seen when node app1's 
   catalog is compiled (which makes such statement placement a very bad idea 
   in general, error notwithstanding).

Example of (1):

class site {
  $is_app_node = false

  if $hostname =~ /^app/ {
# WRONG:
$is_app_node = true
  }
}


Example of (2):
manifests/site.pp:
---
# Top-scope declaration ok here:
$is_app_node = false

node app1 {
  include myapp
}

modules/myapp/manifests/init.pp:
---
# Top-scope declaration unwise here:
$is_app_node = true

class myapp {
  # ...
}


It appears these kind of issues are addressed by creating virtual 
> resources. However I cannot figure out how I can define virtual resources 
> and combine that with create_resources. I need to use the create_resources 
> because I was to pass the hieradata to the resource.
>
> *Any ideas how I can address this problem?*
>
> Details of the implementation given below:
>
> I have following hieradata which applied to each server:
>
> /etc/puppet/hieradata/admin1.json
> {
>"networks":{
>   "eth0":{
>  "ipaddress":"192.168.1.1",
>  "netmask":"255.255.255.0"
>   }
>}
> }
>
> /etc/puppet/hieradata/app1.json
> {
>"networks":{
>   "eth0":{
>  "ipaddress":"192.168.1.2",
>  "netmask":"255.255.255.0"
>   }
>}
> }
>
> I have a class call foundation and it has following files
> /etc/puppet/modules/foundation/manifests/init.pp
> class foundation {
> include foundation::network
> }
>
> /etc/puppet/modules/foundation/manifests/network.pp
> class foundation::network{
>
> # Defaults for network configuration
> $nic_default = {
> 'ensure' => 'up'
> }
>
> # Extract Data from Hiera for the host in concern
> $nics   = hiera("networks",{})
>
> # Configure networks based on the parameters
> create_resources(network::if::static, $nics, $nic_default)
>
> }
>
> Above class is included in base node and individual nodes has extended 
> from the base node
> /etc/puppet/manifests/nodes.pp
> node base {
>include foundation
> }
>
> node admin1 inherits base {
> }
>
> node app1 inherits base {
> }
>
>

I don't see any issue with the code and data you presented.  Have you 
checked the master's logs for more information?  I'm thinking it ought to 
tell you the name of the affected variable.  If it doesn't already do so, 
then perhaps turning on --debug output will induce it to do so.


John

-- 
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/b831782b-22ff-421d-9c07-d7606ff0e0ff%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] I need a virtual exported resource, or something similar

2014-01-16 Thread Stephan
Hi Christopher,

I've spent some time getting my head around Hiera now, and would appreciate 
some help with how to implement your suggestion:

>
> hiera hash with each environment and its associated mount point 
> hiera lookup on a non-management node grabs its environment 
> environment is used to determine which mount point via hiera_hash 
> management node uses create_resources and hiera_hash to make its mount 
> points 
>

I've now got this :hierarchy:
  - "nodes/%{::hostname}"
  - "application_env/%{::application_env}"
  - common

So first I'm assigning a node via hiera to an environment:

hiera/nodes/box1.yaml:
 ---
application::env: "live"


Then I'm setting an external fact named application_env which I pick up by 
Hiera later on (Not sure this construct is good practice, suggestions 
welcome).

Then I'm configuring unrelated environment-specific settings:

hiera/application_env/live.yaml:
---
application::setting1: true
application::setting2: false
application::setting3:
   - 'foo'
   - 'bar'

So the thing is that as soon as I know the environment name I know 
everything I need to know to create a nfs mount resource inside the puppet 
module:

mount { appnfs:
   device   => "${mountip}:/application_${env},
   fstype   => "nfs",
   name => "$mountdir",
}

The same would be true on my Management server, with the difference that 
the name would be name => "${mountdir}_${env}".

So what I don't understand is the hiera hash per environment bit. So I 
guess I could create a single Hash with all the environments instead of the 
above one yaml file per environment. Then I can put hashes in each of these 
hash values with the unrelated application settings. But wouldn't I need 
for create_resources a second unrelated hash with all environments with all 
the settings for the mount resource, like device, fstype, name and so on? 
At that point I would again have double configuration, two separate hashes, 
one for the whole rest, one for the mount resources. Also I actually have 3 
NFS mounts per environment, just mentioned one for simplification. Would 
that be a 3rd and 4th hash with mostly duplicate data? What if I need 
something else on the Management server in future per environment ... a 5th 
hash for that?

My hypothetical virtual exported resource somehow sounds like a more 
intuitive approach. an exported resource, which is only virtual, and can 
therefore realized more than once, namely by every application server which 
is exporting it. This would also help in case I have to configure an 
exception, like I need this nfs mount on all environments, except on the 
environment called data_migration. A hash of all environments, used with 
create_resources wouldn't pick that exception up, right? But maybe I'm not 
fully understanding Hiera's possibilities here?

Thanks
Stephan

 

> Possibly I'm getting 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...@googlegroups.com . 
> >To view this discussion on the web visit 
> >[1]
> https://groups.google.com/d/msgid/puppet-users/26e1282e-45f0-46cd-a7b5-36d50fd012e2%40googlegroups.com.
>  
>
> >For more options, visit [2]https://groups.google.com/groups/opt_out. 
> > 
> > References 
> > 
> >Visible links 
> >1. 
> https://groups.google.com/d/msgid/puppet-users/26e1282e-45f0-46cd-a7b5-36d50fd012e2%40googlegroups.com
>  
> >2. https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/79ec4486-4808-4982-9c25-9d0eddf1a844%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: issues in creating local user on ubuntu client, master on centos

2014-01-16 Thread John Julien


On Thursday, January 16, 2014 9:35:49 AM UTC-6, jyotir bhandari wrote:
>
> Hi John
>
> I just configured as you guided
>
> [root@server manifests]# tree
> .
> |-- account
> |   `-- account.pp
> |-- packages
> |   |-- ec2.pp
> |   |-- elinks.pp
> |   `-- nmap.pp
> `-- site.pp
>
> *accout.pp*
>
> class user::add{
> user { 'demo':
>ensure => present,
>comment => 'demo user',
>home => '/home/demo',
>managehome => true,
>  }
> }
>
> *site.pp*
>
>
>
> node 'client2.puppet.com' {
> import 'packages/nmap.pp'
> import 'packages/elinks.pp'
> import 'packages/ec2.pp'
> import 'account/account.pp'
> include 'user::add'
> }
>
>>
>> I recommended the class puppet::master not user::add, but you are not 
using puppet manifests in the way they are intended.

Your code should be in modules.  You include these pieces of code not 
import them in your site.pp file.

You can read more about import and best practices here:
http://docs.puppetlabs.com/puppet/latest/reference/lang_import.html


Your tree should look like this:

manifests/site.pp
modules/puppet/manifests/init.pp
modules/puppet/manifests/master.pp

In modules/puppet/manifests/init.pp you will define the class puppet.  In 
modules/puppet/manifests/master.pp you will define the class puppet::master 
as so:

class puppet::master {
 user {‘demo’:
 ensure => present,
  }
}

The reason I suggest the puppet::master is you may want to have some common 
code relevant to all sytems running puppet in the puppet class.  Using the 
master class allows you to seperate code that you only want to go on your 
master.
 

-- 
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/93b973a5-9d62-4295-9464-8f7fa9a6fe8f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] config.pp not working as expected

2014-01-16 Thread John
I've got the following code in my config.pp file on a FreeBSD 8.3 host:

freebsd# more config.pp ; 
class ssh::config {
  include ssh::params
  $listenaddress = $ssh::params::listenaddress
  file { $ssh::params::sshd_config_file:
ensure => present,
owner => 'root',
group => 'root',
mode => '0600',
content => template('ssh/sshd_config.erb'),
  }
  file { $ssh::params::ssh_config_file:
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
content => template('ssh/ssh_config.erb'),
  }
}

I want to test that puppet will put back a configuration so I remove the 
contents of /etc/ssh_config file ( echo "" > /etc/ssh_config).  I would 
expect the puppet SSH module I'm using to restore the file contents.  It 
does not.  Furthermore, I believe it thinks I'm running this on a  linux 
host.

Check out the following and please advice.

[root@freebsd ~]# puppet apply --verbose --debug --noop 
/usr/local/etc/puppet/modules/ssh/manifests/init.pp
debug: Creating default schedules
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not 
exist
debug: Puppet::Type::User::ProviderUseradd: file chage does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl 
does not exist
debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/ssl/certs]: Autorequiring File[/var/puppet/ssl]
debug: /File[/var/puppet/state/graphs]: Autorequiring 
File[/var/puppet/state]
debug: /File[/var/puppet/state/last_run_report.yaml]: Autorequiring 
File[/var/puppet/state]
debug: /File[/var/puppet/facts]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/client_data]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/ssl/certificate_requests]: Autorequiring 
File[/var/puppet/ssl]
debug: /File[/var/puppet/ssl/private_keys]: Autorequiring 
File[/var/puppet/ssl]
debug: /File[/var/puppet/ssl/public_keys]: Autorequiring 
File[/var/puppet/ssl]
debug: /File[/var/puppet/client_yaml]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/state/state.yaml]: Autorequiring 
File[/var/puppet/state]
debug: /File[/var/puppet/clientbucket]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/ssl/private]: Autorequiring File[/var/puppet/ssl]
debug: /File[/var/puppet/state/last_run_summary.yaml]: Autorequiring 
File[/var/puppet/state]
debug: /File[/var/puppet/ssl]: Autorequiring File[/var/puppet]
debug: Finishing transaction 17215411540
debug: Loaded state in 0.00 seconds
debug: Loaded state in 0.00 seconds
info: Applying configuration version '1389889969'
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a 
host
debug: /Schedule[hourly]: Skipping device resources because running on a 
host
debug: /Schedule[never]: Skipping device resources because running on a host
debug: /Schedule[weekly]: Skipping device resources because running on a 
host
debug: /Schedule[puppet]: Skipping device resources because running on a 
host
debug: Finishing transaction 17214171820
debug: Storing state
debug: Stored state in 0.01 seconds
notice: Finished catalog run in 0.06 seconds
debug: Finishing transaction 17213963220
debug: Received report to process from freebsd.cde.vrsn.com
debug: Processing report from freebsd.cde.vrsn.com with processor 
Puppet::Reports::Store
[root@-freebsd ~]# 

-- 
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/327ff90c-5493-4ee4-a44c-89aebbcaf32d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Three level hashes in ERB

2014-01-16 Thread paul . lewis
I have been trying to create a three level hash to dump into a template, 
but the deepest layer of the hash seems to not work.

My hash:

$clusters = {
'Default' => {
  '127.0.0.1:11211' => { 
'hostname' => '127.0.0.1', 
'port' => '11211'
  },
},
  }

My ERB template (modified for readability):
<% @clusters.sort.map do |k,v| -%>
  <% if v.is_a?(Hash) -%>
'<%= k %>'
<% @clusters[k].sort.map do |ki, vi| -%>
  <% if vi.is_a?(Hash) -%>
'<%= ki %>'
<% @clusters[ki].sort.map do |kii, vii| -%>
  <% if vi and vi != '' -%>
'<%= kii %>' = '<%= vii %>',
  <% end -%>
<% end -%>
  <% end -%>
<% end -%>
  <% end -%>
<% end -%>

For some reason that I can't quite figure out, the innermost hash throws 
a Detail: undefined method `sort' for nil:NilClass error. I assume if ki 
was not a hash, the if vi.us_a?(Hash) would have been false and skipped 
that sort.

What am I doing wrong here?

-- 
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/da61d6e0-40bc-4dca-893a-717dcd44004b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Dynamic lookup deprecation warning

2014-01-16 Thread Andrea Cappelli

Hi,
I'm searching through the logs of my master for the warning in the 
subject, to move to Puppet3


Sometimes in the warning the manifest name isn't showed up, thereis a 
reason?


Thu Jan 16 14:58:02 +0100 2014 Puppet (warning): Dynamic lookup of 
$mailaddr is deprecated. For more information, see 
http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the 
change in behavior, use the --debug flag.


Thu Jan 16 17:09:07 +0100 2014 Puppet (warning): Dynamic lookup of 
$domain at /path/to/a/file/dotpp.pp/:127 is deprecated. For more 
information, see 
http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the 
change in behavior, use the --debug flag.


How can I easy discover where the dynamic lookup occurs in the first case?

Thank you

--
Andrea Cappelli

--
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/52D80F4B.1070108%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Divide init.pp into components

2014-01-16 Thread jcbollinger


On Thursday, January 16, 2014 9:09:59 AM UTC-6, David Jarosch wrote:
>
> Sorry,
>
> but I'm a little bit pissed off. It seem's that this problem is caused by 
> my keyboard and some kind of keyboard char coding/interpreting or 
> something. This char ' was somehow interpreted different then in the Pro 
> Puppet 2nd edition book which also look's exactly the same! I've copied 
> this character ( ' ) from the book and pasted it in my manifest and voila, 
> it worked!
>
>
For what it's worth, the string delimiters in Puppet are the US-ASCII 
apostrophe and quotation mark, aka Unicode characters U+0027 and U+0022, 
respectively.  There are other characters that your system may render 
similarly to one of those, such as U+0060 (grave accent) U+00B4 (accute 
accent) and at least half a dozen others.  How similar any of those look to 
each other is a matter of the display font with which they are rendered.


John

-- 
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/b94ac637-c779-431c-89d2-9f1671a1d5e0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Strange behavior from puppetforge firewall module

2014-01-16 Thread Chris W
We are using the puppetforge firewall module to lay down 2 sets of rules.
The first are a default set laid down in our home grown ssh module's 
init.pp -
firewall { '210 TCP - Accept SSH from X':
  state   => ['NEW'],
  proto   => 'tcp',
  dport   => $ssh_port,
  iniface => $ssh_device,
  source  => 'X.X.X.X',
  action  => 'accept',
}

firewall { '211 TCP - Accept SSH from Y':
  state   => ['NEW'],
  proto   => 'tcp',
  dport   => $ssh_port,
  iniface => $ssh_device,
  source  => 'Y.Y.Y.Y',
  action  => 'accept',
}
These rules persist fine., as do these from our iptables pre.pp

  firewall { '010 ALL - ACCEPT RELATED and ESTABLISHED':
proto   => 'all',
state   => ['RELATED', 'ESTABLISHED'],
action  => 'accept',
  }

  # DROP all NetBIOS broadcast
  firewall { '020 UDP - DROP NetBIOS Traffic':
proto   => 'udp',
port=> ['137','138'],
action  => 'drop',
  }

  # ACCEPT all to localhost
  firewall { '030 ALL - ACCEPT all to localhost':
proto   => 'all',
iniface => 'lo',
action  => 'accept',
  }

However, the following set laid down from a service module 
manifests/firewall.pp are flakey -

class s_*targetserver*_rh6::firewall {

  # ACCEPT all to localhost
  firewall { '213 ALL - ACCEPT all to P2P3 (HeartBeat Link)':
proto   => 'all',
iniface => 'p2p3',
action  => 'accept',
  }

  # Accept ssh from server1
  firewall { '216 ALL - ACCEPT AFD monitoring from server1 on management':
state   => ['NEW'],
proto   => 'tcp',
port   => ['', '4445', '4446', '4447'],
iniface => '*mangement nic*',
source  => '*server1 IP*',
action  => 'accept',
  }

  # Accept ssh from server2
  firewall { '217 ALL - ACCEPT AFD monitoring from server2 on management':
state   => ['NEW'],
proto   => 'tcp',
port   => ['', '4445', '4446', '4447'],
iniface => '*management nic*',
source  => '*server2 IP*',
action  => 'accept',
  }
  
  # Accept ssh from server3 port 
  firewall { '218 ALL - ACCEPT AFD monitoring from server3 on management':
state   => ['NEW'],
proto   => 'tcp',
port   => ['', '4445', '4446', '4447'],
iniface => '*management nic*',
source  => '*server3 IP*',
action  => 'accept',
  }

  # ACCEPT all on BOND1
  firewall { '214 ALL - ACCEPT all to BOND1 (DRDB Link)':
proto   => 'all',
iniface => 'bond1',
action  => 'accept',
  }

  # ACCEPT ftp on Data
  firewall { '215 ALL - ACCEPT FTP on BOND0 (Data Link)':
proto   => 'tcp',
port=> '21',
iniface => 'bond0',
action  => 'accept',
  }

}

AFD is file distribution software from Deutscher Wetterdienst.

If I do iptables -F on the box, these are reliably applied but, during a 
random Puppet Agent run they are subsequently removed.
Later, again at random, they are reapplied.
I've just updated the firewall module, so we are running on version 0.4.2.

Anyone else seen this sort of behaviour or have any suggestions?

-- 
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/de09a23b-ae81-46f3-a9c0-80924199b120%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: I need a virtual exported resource, or something similar

2014-01-16 Thread Andrey Kozichev
Thank you guys, I have figured it out.

I am defining all shares in one file and introducing 1 extra argument which
tells if share enable/disabled.(all disabled by default)

In my defined resource I am doing one more hiera lookup for this argument
"hiera("nfs_mount::${name}")"  and if true - use create_resources.

This way I have 1 file in hiera with all definitions + nfs_mount::${name}:
true  define per host basis for servers where I need share this mounted.


The thing is - that was my initial plan to do, but I kept getting "resource
already defined" when multiple shares existed with the same mountpoint name.

Looks like it was happening due to the incorrect layout I have created in
hiera(I have assigned "name" of the resource to be the same as the mount
point). Now I have changed this and all works as expected.

it used to be:
nfsshares:
  share1:
name: /mnt
  share2:
name: /mnt

Changed to:

nfsshares:
  share1:
dir: /mnt
  share2:
dir: /mnt

Regards,
Andrey





Andrey








On 15 January 2014 07:29, Andrey Kozichev  wrote:

> Thanks for the link. I will have a look.
> On 15 Jan 2014 04:16, "Garrett Honeycutt"  wrote:
>
>>
>>
>> On Monday, January 13, 2014 9:38:33 PM UTC-5, ianm wrote:
>>>
>>> On 14/01/14 03:49, Andrey Kozichev wrote:
>>>
>>> > This scenario works well if on the class input I just supply single
>>> > mountpoint -> then I do hiera("mountpointname") and create_resources()
>>> > But if I want to have multiple Mountpoints defined per host I need to
>>> > supply an Array to the class and then iterate it and fetch details for
>>> > each mountpoint. I can probably do this by using new 3.2 syntax with
>>> > "each", but I would like to avoid this.
>>> >
>>> > Do you have any better way to implement this?
>>>
>>> If in hiera you define a hash of hashes (instead of an array of hashes)
>>> you can pass that to create_resources which will create a resource for
>>> each hash.
>>>
>>>
>>
>>> --
>>> Ian
>>>   i.mor...@uq.edu.au Ian Mortimer
>>>   Tel: +61 7 3346 8528 Science IT
>>>University of Queensland
>>>
>>
>> I have this implemented[1] such that you define a hash of your mounts
>> somewhere in Hiera. If you want to do a merge lookup against Hiera so that
>> if you specify the hash at multiple levels it gets all that it matches (ie:
>> fqdn, profile and environment levels), you can do this by setting
>> nfs::hiera_hash: true
>>
>> [1] - https://github.com/ghoneycutt/puppet-module-nfs
>>
>> --
>> 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/3741b3dd-0dbb-4c29-8d58-06250344289e%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFeHrtyhJmVmCs0OCngETAyfG0_bF%2BqFC5WwCKHdHJ2tzw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Rspec-puppet and testing for expected failures...

2014-01-16 Thread Gavin Williams
Afternoon all, 

I'm trying to add some rspec-puppet testing to my Glassfish module[1], in 
preparation for releasing it to the forge. 

I've got some stuff working fine, however I'm trying to test expected 
failure scenarios without much luck. 

Travis CI[2] highlights the issues I'm seeing. 
An example error message is: 

> Failure/Error: expect {
>
> expected Puppet::Error with message matching /OSFamily Suse not supported/ 
> but nothing was raised
>
This is as a result of a test[3] which is testing some validation logic in 
my create_service[4] defined type. 

Any pointers on where I could be going wrong? 

Thanks in advance for any responses. 

Regards
Gavin 

[1] https://github.com/fatmcgav/puppet-glassfish
[2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17072897#
[3] 
https://github.com/fatmcgav/puppet-glassfish/blob/master/spec/defines/create_service_spec.rb#L127-149
[4] 
https://github.com/fatmcgav/puppet-glassfish/blob/master/manifests/create_service.pp#L14-19

-- 
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/f04c1f56-60c0-4fa9-be03-f5fbe1129ce5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Divide init.pp into components

2014-01-16 Thread Ramin K

On 1/16/2014 3:16 AM, David Jarosch wrote:

   ### INSTALL NRPE PLUGINS WITHOUT ADDITIONAL RECOMMENDED PACKAGES
   exec { 'nagios-nrpe-plugin':
 unless  => '/usr/bin/dpkg -l |grep nagios-nrpe-plugin',
 require => Class['nrpe::package'],
 command => '/usr/bin/apt-get install nagios-nrpe-plugin -y
--no-install-recommends';
   }


	I highly recommend turning off recommends globally on Debian based 
systems. It's a bit more work in the beginning, but you remove a large 
set of unknown behavior. With Puppet it is best to be explicit in 
describing the final state of your machines and Recommends is a bit too 
magical sometimes. It is a gray area based on conversations I've had 
with other sys admins and it may make sense in your env.


	IIRC is was installing nagios-plugins-all with recommends enabled that 
caused our one and only Puppet related site outage. That package pulled 
in Nagios which in turn needed apache-prefork which of course removed 
apache-mpm-worker and brought the site down. Admittedly we would have 
caught that if I hadn't been developing on a VM with Nagios already 
installed.


Ramin

--
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/52D816EC.9010305%40badapple.net.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Replacing file errors: getaddrinfo: No such host is known

2014-01-16 Thread pskovshurik
Hi guys,

I am new to Puppet and have a very strange error that I cannot seem to 
solve. I am using Puppet Master 3.4.1 with Apache/Passenger config in 
CentOS and my Puppet Agent in Windows. 

When I try to create a file that doesn't exist using Puppet, it works fine. 
In this case, I am simply creating C:\test.txt file.

C:\>puppet agent -t
Info: Retrieving plugin
Info: Caching catalog for sstm-mntr01.colo.svg.local
Info: Applying configuration version '1389894672'
Notice: /Stage[main]/Createfile/File[testfile]/ensure: defined content as 
'{md5} 803d1a275b8c8c4cc084d54c78c2ed61'
Notice: Finished catalog run in 2.39 seconds

All is well. Now, if I edit the file and save it, and rerun the above 
command, I get this:

C:\>puppet agent -t
Info: Retrieving plugin
Info: Caching catalog for sstm-mntr01.colo.svg.local
Info: Applying configuration version '1389894672'
Notice: /Stage[main]/Createfile/File[testfile]/content:

Error: Could not back up C:/test.txt: getaddrinfo: No such host is known.
Error: Could not back up C:/test.txt: getaddrinfo: No such host is known.
Error: /Stage[main]/Createfile/File[testfile]/content: change from 
{md5}fb4bb40e
a8ac9631aa3ad463e41e239e to {md5}803d1a275b8c8c4cc084d54c78c2ed61 failed: 
Could
not back up C:/test.txt: getaddrinfo: No such host is known.
Notice: Finished catalog run in 1.77 seconds

The module is very simple:

# pwd
/etc/puppet/modules/createfile/manifests
# cat init.pp
 class createfile ($file_arg = undef, $content_arg = undef) {
  case $operatingsystem {
windows: {
  $default_filename = [ "C:\\test.txt" ]
  $default_content = $fqdn
}
  }

  if $file_arg == undef {
$file_real = $default_filename
}
  else {
$file_real = $file_arg
  }

  if $content_arg == undef {
$content_real = $default_content
}
  else {
$content_real = $content_arg
  }

  file { 'testfile':
path=> $file_real,
ensure  => file,
content => $content_real
  }
   }

Any ideas what this could be? I can resolve all hosts, master and agent 
from all servers. I don't even know what it's doing trying to do a 
getaddrinfo?!

Thanks
Alex

-- 
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/c75d8f46-f648-414e-baba-3ac58cb920c9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Replacing file errors: getaddrinfo: No such host is known

2014-01-16 Thread Jose Luis Ledesma
Could be something about filebucket?  Perhaps launching the agent with debug 
gives some hint

-- 
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/475ba878-79b5-4076-b128-0170b6140a2f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] 400 Error on nodes when trying to receive catalog from master

2014-01-16 Thread Jordan Piel
I've dabbled with puppet, but this is my first time setting it up. I'm 
running RHEL 6.5 on PE 3.1.1 on both my master and my agents. The issue I'm 
having is the agents throw an error during a normal puppet run. The error 
I'm seeing when I run 'puppet agent run --test' is...

Error: Could not request certificate: Error 400 on SERVER: 

400 Bad Request

Bad Request
Your browser sent a request that this server could not understand.


Apache Server at puppet.my.domain.name Port 8140


If I specify the master when I manually run puppet on the agent node 
'puppet agent run --test --server puppet.my.domain.name' it runs perfectly 
fine with 0 hiccups. Has anyone run in to this before? If more information 
is needed I'm willing to provide it. Thanks in advance!

-- 
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/8a76c0e0-3f82-4e61-83c6-a64e62b9a2a3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Passing hash as parameters to manifest

2014-01-16 Thread Reinaldo Lima
Nan Liu,

this help me A LOT,

thank you so much!

On Thursday, August 11, 2011 11:11:31 PM UTC-3, Nan Liu wrote:
>
> On Thu, Aug 11, 2011 at 7:19 PM, treydock > 
> wrote:
> > Looking up the use of create_resources which is mentioned in the bug
> > you linked, looks like it's available only in 2.7.x.  I'm currently
> > running 2.6.9, but may be worth upgrading for.
>
> Pretty sure you can be backport to 2.6 since it's just a function:
>
> https://github.com/puppetlabs/puppetlabs-create_resources
>
> > I tried you suggestion, but get this error...
> >
> > err: Could not retrieve catalog from remote server: Error 400 on
> > SERVER: Invalid tag "dump_dir/backups/redmine-
> > sqldumpsdatabasesredminebackup_dir/var/www/rails/redmine" at /etc/
> > puppet/modules/backuppc/manifests/definitions/sqldump.pp:11 on
> > node ...
>
> Can't say for sure without more code, but this simple example should
> demonstrate how this works:
>
> $myhash = {
>   var1 => {
> message => 'hi'
>   },
>   var2 => {
> message => 'bye'
>   }
> }
>
> define my_notify ($var) {
>   notify { $name:
> message => $var[$name]['message']
>   }
> }
>
> my_notify { ['var1', 'var2']:
>   var => $myhash
> }
>
> > Also I am not sure what you mean by "functions that get an array of
> > first level hash keys".
>
> I mean if you need this to work with any hash without manually
> providing an array of resource titles write a custom puppet function
> that returns hash keys as a custom puppet function.
>
> Thanks,
>
> Nan
>
>

-- 
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/1d28b4c4-2d57-4309-86f5-659a8770cb29%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Replacing file errors: getaddrinfo: No such host is known

2014-01-16 Thread pskovshurik
What's filebucket? Don't think I've been introduced to that yet

Debug or verbose isn't giving anything useful :(

-- 
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/eb26ddf6-53b4-4c6a-a4f1-34c485f59d22%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Three level hashes in ERB

2014-01-16 Thread Sebastiaan

On 01/16/2014 05:47 PM, paul.le...@complex.com wrote:

I have been trying to create a three level hash to dump into a template,
but the deepest layer of the hash seems to not work.

My hash:

$clusters = {
 'Default' => {
   '127.0.0.1:11211' => {
 'hostname' => '127.0.0.1',
 'port' => '11211'
   },
 },
   }

My ERB template (modified for readability):
<% @clusters.sort.map do |k,v| -%>
   <% if v.is_a?(Hash) -%>
 '<%= k %>'
 <% @clusters[k].sort.map do |ki, vi| -%>
   <% if vi.is_a?(Hash) -%>
 '<%= ki %>'
 <% @clusters[ki].sort.map do |kii, vii| -%>
   <% if vi and vi != '' -%>
 '<%= kii %>' = '<%= vii %>',
   <% end -%>
 <% end -%>
   <% end -%>
 <% end -%>
   <% end -%>
<% end -%>



You are going through a hash inside a hash, so you have to call the 
second sort on the hash inside the hash:


  <% @clusters[k][ki].sort.map do |kii, vii| -%>

--
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/52D84849.1050708%40superseb.nl.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Augeas: Duplicate declaration

2014-01-16 Thread Reinaldo Lima
Hi Everyone,

I'm trying to write a class that put some entries in "/etc/hosts" file as 
follow below:

*class hosts {*

*$netentry = {*
*host01 => { iphost => '192.168.10.1', hostName => host01 
},*
*host02 => { iphost => '192.168.10.2', hostName => host02 
},*
*host03 => { iphost => '192.168.10.3', hostName => host03 
},*
*}*

*define hostsinclude ($entry) {*
*   augeas { "hosts_include":*
*   incl => "/etc/hosts",*
*   lens => "Hosts.lns",*
*   changes => [*
*   "set /files/etc/hosts/01/ipaddr 
$entry[$name]['iphost']",*
*   "set 
/files/etc/hosts/01/canonical$entry[$name]['hostName']",*
*   ],*
*   onlyif => "match */ipaddr[ . = 
$entry[$name]['iphost'] ] size == 0"*
*   }*
*}*

*hostsinclude { [*
*'host01',*
*'host02',*
*'host03'*
*]:*
*entry => $netentry*
*}*

*}*


and, when puppet compiles the manifest, I get the following error: 

*err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: Augeas[hosts_include] is already declared in file 
/puppet/environments/production/modules/checklist/manifests/hosts.pp at 
line 10; cannot redeclare at 
/puppet/environments/production/modules/checklist/manifests/hosts.pp:29 on 
node*

Someone can help me?

Thanks

-- 
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/fe9040f2-54de-4f9c-9787-4736b37219d9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Rspec-puppet and testing for expected failures...

2014-01-16 Thread fatmcgav
Quick update...

Many thanks to @superseb for working up a PR[1] that fixes the expect
errors. Trick was to use 'subject' within the expect, rather than a
resource title...

@superseb also highlighted an old Puppet bug[2] which I've migrated across
to Jira[3] for review/decision.
However as per the notes on Redmine, I should be able to work around said
bug by using a case statement rather then the tenary operator...

Onwards and upwards.

Cheers
Gav

[1] https://github.com/fatmcgav/puppet-glassfish/pull/8
[2] http://projects.puppetlabs.com/issues/4598
[3] https://tickets.puppetlabs.com/browse/PUP-1457
On 16 Jan 2014 17:27, "Gavin Williams"  wrote:

> Afternoon all,
>
> I'm trying to add some rspec-puppet testing to my Glassfish module[1], in
> preparation for releasing it to the forge.
>
> I've got some stuff working fine, however I'm trying to test expected
> failure scenarios without much luck.
>
> Travis CI[2] highlights the issues I'm seeing.
> An example error message is:
>
>> Failure/Error: expect {
>>
>> expected Puppet::Error with message matching /OSFamily Suse not
>> supported/ but nothing was raised
>>
> This is as a result of a test[3] which is testing some validation logic in
> my create_service[4] defined type.
>
> Any pointers on where I could be going wrong?
>
> Thanks in advance for any responses.
>
> Regards
> Gavin
>
> [1] https://github.com/fatmcgav/puppet-glassfish
> [2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17072897#
> [3]
> https://github.com/fatmcgav/puppet-glassfish/blob/master/spec/defines/create_service_spec.rb#L127-149
> [4]
> https://github.com/fatmcgav/puppet-glassfish/blob/master/manifests/create_service.pp#L14-19
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/Ek0ckKfPGYw/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f04c1f56-60c0-4fa9-be03-f5fbe1129ce5%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGJCw3j1fKUp1AajMoR6H5yH18zGBxD%3DzAwd%2B2X7%2Bjbv8p_afw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Augeas: Duplicate declaration

2014-01-16 Thread Nick Cammorato
Your augeas resource is always called hosts_include which is why it's doing
that.  Try including the entry[name] in that resource name.
On Jan 16, 2014 4:15 PM, "Reinaldo Lima"  wrote:

> Hi Everyone,
>
> I'm trying to write a class that put some entries in "/etc/hosts" file as
> follow below:
>
> *class hosts {*
>
> *$netentry = {*
> *host01 => { iphost => '192.168.10.1', hostName => host01
> },*
> *host02 => { iphost => '192.168.10.2', hostName => host02
> },*
> *host03 => { iphost => '192.168.10.3', hostName => host03
> },*
> *}*
>
> *define hostsinclude ($entry) {*
> *   augeas { "hosts_include":*
> *   incl => "/etc/hosts",*
> *   lens => "Hosts.lns",*
> *   changes => [*
> *   "set /files/etc/hosts/01/ipaddr
> $entry[$name]['iphost']",*
> *   "set
> /files/etc/hosts/01/canonical$entry[$name]['hostName']",*
> *   ],*
> *   onlyif => "match */ipaddr[ . =
> $entry[$name]['iphost'] ] size == 0"*
> *   }*
> *}*
>
> *hostsinclude { [*
> *'host01',*
> *'host02',*
> *'host03'*
> *]:*
> *entry => $netentry*
> *}*
>
> *}*
>
>
> and, when puppet compiles the manifest, I get the following error:
>
> *err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Duplicate declaration: Augeas[hosts_include] is already declared in file
> /puppet/environments/production/modules/checklist/manifests/hosts.pp at
> line 10; cannot redeclare at
> /puppet/environments/production/modules/checklist/manifests/hosts.pp:29 on
> node*
>
> Someone can help me?
>
> Thanks
>
> --
> 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/fe9040f2-54de-4f9c-9787-4736b37219d9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAKJ8awc5X%2B97jtxwbe%3DpjqhjqyuF8S_dR_GvAAXM%2BC8t3FC9xA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] 400 Error on nodes when trying to receive catalog from master

2014-01-16 Thread Andrey Kozichev
looks like your apache redirect doesn't work. Or puppet master stopped.(if
you are using mongrel)
check htttpd.conf

Andrey
On 16 Jan 2014 19:20, "Jordan Piel"  wrote:

> I've dabbled with puppet, but this is my first time setting it up. I'm
> running RHEL 6.5 on PE 3.1.1 on both my master and my agents. The issue I'm
> having is the agents throw an error during a normal puppet run. The error
> I'm seeing when I run 'puppet agent run --test' is...
>
> Error: Could not request certificate: Error 400 on SERVER:  PUBLIC "-//IETF//DTD HTML 2.0//EN">
> 
> 400 Bad Request
> 
> Bad Request
> Your browser sent a request that this server could not understand.
> 
> 
> Apache Server at puppet.my.domain.name Port 8140
> 
>
> If I specify the master when I manually run puppet on the agent node
> 'puppet agent run --test --server puppet.my.domain.name' it runs
> perfectly fine with 0 hiccups. Has anyone run in to this before? If more
> information is needed I'm willing to provide it. Thanks in advance!
>
> --
> 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/8a76c0e0-3f82-4e61-83c6-a64e62b9a2a3%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFejYVeFrg-amrH9s9k%3Dap-nYzwKPGgibQaZR2V9aOGb4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Augeas: Duplicate declaration

2014-01-16 Thread Andrey Kozichev
another option to use create_resources('hostinclude',$netentry)
On 16 Jan 2014 23:47, "Nick Cammorato"  wrote:

> Your augeas resource is always called hosts_include which is why it's
> doing that.  Try including the entry[name] in that resource name.
> On Jan 16, 2014 4:15 PM, "Reinaldo Lima"  wrote:
>
>> Hi Everyone,
>>
>> I'm trying to write a class that put some entries in "/etc/hosts" file as
>> follow below:
>>
>> *class hosts {*
>>
>> *$netentry = {*
>> *host01 => { iphost => '192.168.10.1', hostName => host01
>> },*
>> *host02 => { iphost => '192.168.10.2', hostName => host02
>> },*
>> *host03 => { iphost => '192.168.10.3', hostName => host03
>> },*
>> *}*
>>
>> *define hostsinclude ($entry) {*
>> *   augeas { "hosts_include":*
>> *   incl => "/etc/hosts",*
>> *   lens => "Hosts.lns",*
>> *   changes => [*
>> *   "set /files/etc/hosts/01/ipaddr
>> $entry[$name]['iphost']",*
>> *   "set
>> /files/etc/hosts/01/canonical$entry[$name]['hostName']",*
>> *   ],*
>> *   onlyif => "match */ipaddr[ . =
>> $entry[$name]['iphost'] ] size == 0"*
>> *   }*
>> *}*
>>
>> *hostsinclude { [*
>> *'host01',*
>> *'host02',*
>> *'host03'*
>> *]:*
>> *entry => $netentry*
>> *}*
>>
>> *}*
>>
>>
>> and, when puppet compiles the manifest, I get the following error:
>>
>> *err: Could not retrieve catalog from remote server: Error 400 on SERVER:
>> Duplicate declaration: Augeas[hosts_include] is already declared in file
>> /puppet/environments/production/modules/checklist/manifests/hosts.pp at
>> line 10; cannot redeclare at
>> /puppet/environments/production/modules/checklist/manifests/hosts.pp:29 on
>> node*
>>
>> Someone can help me?
>>
>> Thanks
>>
>> --
>> 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/fe9040f2-54de-4f9c-9787-4736b37219d9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAKJ8awc5X%2B97jtxwbe%3DpjqhjqyuF8S_dR_GvAAXM%2BC8t3FC9xA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFemrZtFMUnyU6SUbvFE9KyVrjK7s19YpOFmLnMeJyUE0g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] exec only if condition is true

2014-01-16 Thread kaustubh chaudhari
Hi All,

I am not a programer or from the same background, trying to explore! Please 
excuse if you find this question silly.

I was to exec a .bat file of if there are any changes to the files. Eg: i 
am trying to activate windows with the valid keys, however this action is 
required only once.
My current code will execute it with every puppet run. How can i configure 
it to run it only when there are any changes to .bat file, say i wish to 
change the key.


==
file {'C:/Windows/puppetwinactivaion.bat':
ensure => 'file',
source => 
'puppet:///modules/win642k8hardning/puppetwinactivaion.bat',
mode => '0755',
notify => Exec['puppetwinactivaion.bat'],
}
exec {'puppetwinactivaion.bat':
require => File['C:/Windows/puppetwinactivaion.bat'],
command => 'C:/Windows/puppetwinactivaion.bat',
}
==

-Kaustubh

-- 
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/6695d390-ff19-4ba3-8016-75f428e51661%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] exec only if condition is true

2014-01-16 Thread Gonzalo Servat
Add "refreshonly => true" to the exec definition.

GS
On 17/01/2014 6:17 pm, "kaustubh chaudhari"  wrote:

> Hi All,
>
> I am not a programer or from the same background, trying to explore!
> Please excuse if you find this question silly.
>
> I was to exec a .bat file of if there are any changes to the files. Eg: i
> am trying to activate windows with the valid keys, however this action is
> required only once.
> My current code will execute it with every puppet run. How can i configure
> it to run it only when there are any changes to .bat file, say i wish to
> change the key.
>
>
> ==
> file {'C:/Windows/puppetwinactivaion.bat':
> ensure => 'file',
> source =>
> 'puppet:///modules/win642k8hardning/puppetwinactivaion.bat',
> mode => '0755',
> notify => Exec['puppetwinactivaion.bat'],
> }
> exec {'puppetwinactivaion.bat':
> require => File['C:/Windows/puppetwinactivaion.bat'],
> command => 'C:/Windows/puppetwinactivaion.bat',
> }
> ==
>
> -Kaustubh
>
> --
> 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/6695d390-ff19-4ba3-8016-75f428e51661%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAHpidMBytDPm%2BpbMtBo2xtd9SGuHOwPQPTZcfUHBx653TwVH%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] exec only if condition is true

2014-01-16 Thread kaustubh chaudhari
Hey GS,

Thanks a lot! it work as expected. I also explored about other options that 
i can use with exec.

Cheerzzz!
-Kaustubh

On Friday, January 17, 2014 2:19:20 AM UTC-5, Gonzalo wrote:
>
> Add "refreshonly => true" to the exec definition.
>
> GS
> On 17/01/2014 6:17 pm, "kaustubh chaudhari" > 
> wrote:
>
>> Hi All,
>>
>> I am not a programer or from the same background, trying to explore! 
>> Please excuse if you find this question silly.
>>
>> I was to exec a .bat file of if there are any changes to the files. Eg: i 
>> am trying to activate windows with the valid keys, however this action is 
>> required only once.
>> My current code will execute it with every puppet run. How can i 
>> configure it to run it only when there are any changes to .bat file, say i 
>> wish to change the key.
>>
>>
>> ==
>> file {'C:/Windows/puppetwinactivaion.bat':
>> ensure => 'file',
>> source => 
>> 'puppet:///modules/win642k8hardning/puppetwinactivaion.bat',
>> mode => '0755',
>> notify => Exec['puppetwinactivaion.bat'],
>> }
>> exec {'puppetwinactivaion.bat':
>> require => File['C:/Windows/puppetwinactivaion.bat'],
>> command => 'C:/Windows/puppetwinactivaion.bat',
>> }
>> ==
>>
>> -Kaustubh
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/6695d390-ff19-4ba3-8016-75f428e51661%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7d6e6376-9e7f-4853-9e3c-c600a6b23167%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet failed run: How to find?

2014-01-16 Thread kaustubh chaudhari
Hi All,

How can i find all the failed puppet run in last 30 days!

In dash board i can see if the agent run is failing, but if it has 
recovered it will be green again.

Practically it not possible to see the Daily run status and look for a red 
mark if i have 3000 servers.

Is there a way i can see all the failed reports for last 30 days!

Kaustubh

-- 
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/c4d6aca5-4ed8-4f31-91bb-a9a47b0a788b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet user context

2014-01-16 Thread Robert Turk


Am 16.01.14 13:50, schrieb Andrey Kozichev:
Do you need to run this only for logged in users? 
No not really... You suggest I could do something like checking which 
users exist on the machine and then run it for these users

ignoring if they are logged in or not?

You can use facter fact to return logged in users and use it in your 
manifest.

Do you mean building a custom fact for this value?

Robert


--
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/52D8DE22.6050906%40reproflex.de.
For more options, visit https://groups.google.com/groups/opt_out.