[Puppet Users] Variable scope when having node inheritance

2011-08-05 Thread Thomas Rasmussen
Hi

I'm having some trouble with the following setup:

node 'serverA' inherits server-defaults {
  include myApp::install
}

node 'server-defaults' inherits default {
  $sudoenv = 'custom_server'
}

node default {
  $sudoenv = 'default'
  include sudoers::config
}

class sudoers::config {
  file { /etc/sudoers:
ensure = file,
owner = root,
group = root,
mode = 440,
source = puppet:///modules/sudoers/sudoers_
$sudoenv,
  }
}

I have then created to files: sudoers_default and
sudoers_custom_server

I want to have a default sudoers file on most of my servers, but on a
few others, I need a different one, but on serverA I only get the
sudoers_default file. I have tried to create it as a template (still
using the $sudoenv varialbe) but this does not have any effect. Only
if I move the include sudoers::config to the 'server-defaults' node,
then it works as I want.

Being somewhat new to puppet, I really cant figure out how I can solve
this task, but hopefully somebody can give some good hints?

There isn't any of my default variables that I can use instead of
$sudoenv.

Hope somebody has hints

Regards
Thomas

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



Re: [Puppet Users] Puppet Newbie

2011-08-05 Thread Denmat
Hi,

You can use facts supplied by facter to do the following (assuming you want to 
do this for host with hostname host1).

 puppet:///files/configuration_files/${hostname}/mystuff/test.sh',


You can also assign variables easily like:
$host = 'host1'

And then use $host in your source statement. Depends on exactly what you want 
to do.

The puppet docs cover all this very well.

Cheers,
Den

On 05/08/2011, at 15:31, octomeow octom...@gmail.com wrote:

 Hi
 
 I have a very simple manifest
 
 file { '/mystuff/test.sh':
  ensure = file,
  mode   = 0755,
  source = 'puppet:///files/configuration_files/host1/mystuff/
 test.sh',
}
 
 I would like to define the host1 as a variable while fetching from
 the puppetmaster
 How can I do that?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



Re: [Puppet Users] Variable scope when having node inheritance

2011-08-05 Thread Denmat
Hi,

You setting sudoenv to default in the default node. That is not overridden by 
subsequent node declarations.

If you are using 2.6 and above I would pass a parameter to the sudoers class.

 class sudoers::config (env = 'default') {
  file { /etc/sudoers:
ensure = file,
owner = root,
group = root,
mode = 440,
source = puppet:///modules/sudoers/sudoers_
 ${env},
  }


then maybe call like this.

 node 'server-defaults' inherits default {
  class {sudoers::config: env = 'custom_server' }
 }

then
 node default {
  class {sudoers::config: }
 }


That might help you.

Cheers,
Den
On 05/08/2011, at 17:02, Thomas Rasmussen rasmussen.tho...@gmail.com wrote:

 Hi
 
 I'm having some trouble with the following setup:
 
 node 'serverA' inherits server-defaults {
  include myApp::install
 }
 
 node 'server-defaults' inherits default {
  $sudoenv = 'custom_server'
 }
 
 node default {
  $sudoenv = 'default'
  include sudoers::config
 }
 
 class sudoers::config {
  file { /etc/sudoers:
ensure = file,
owner = root,
group = root,
mode = 440,
source = puppet:///modules/sudoers/sudoers_
 $sudoenv,
  }
 }
 
 I have then created to files: sudoers_default and
 sudoers_custom_server
 
 I want to have a default sudoers file on most of my servers, but on a
 few others, I need a different one, but on serverA I only get the
 sudoers_default file. I have tried to create it as a template (still
 using the $sudoenv varialbe) but this does not have any effect. Only
 if I move the include sudoers::config to the 'server-defaults' node,
 then it works as I want.
 
 Being somewhat new to puppet, I really cant figure out how I can solve
 this task, but hopefully somebody can give some good hints?
 
 There isn't any of my default variables that I can use instead of
 $sudoenv.
 
 Hope somebody has hints
 
 Regards
 Thomas
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



[Puppet Users] Re: Variable scope when having node inheritance

2011-08-05 Thread Thomas Rasmussen
Hi

Thanks for the reply, that works, but I'd like to keep my include of
the sudoers::config in my default node section, but if I do that, then
I don't have the $sudoenv variable available at that time.

Is there any way of overriding a previously include of a class? I
tried to 'sudoers::config': sudoenv= $sudoenv, stage = install;  in
my server-defaults node definition, but puppet gave me a duplicate
error on include.

I'm running 2.6.4 on both server and client side.

Regards
Thomas

On Aug 5, 10:09 am, Denmat tu2bg...@gmail.com wrote:
 Hi,

 You setting sudoenv to default in the default node. That is not overridden by 
 subsequent node declarations.

 If you are using 2.6 and above I would pass a parameter to the sudoers class.

  class sudoers::config (env = 'default') {
   file { /etc/sudoers:
     ensure = file,
     owner = root,
     group = root,
     mode = 440,
     source = puppet:///modules/sudoers/sudoers_
  ${env},
   }

 then maybe call like this.

  node 'server-defaults' inherits default {
   class {sudoers::config: env = 'custom_server' }
  }

 then

  node default {
   class {sudoers::config: }
  }

 That might help you.

 Cheers,
 Den
 On 05/08/2011, at 17:02, Thomas Rasmussen rasmussen.tho...@gmail.com wrote:







  Hi

  I'm having some trouble with the following setup:

  node 'serverA' inherits server-defaults {
   include myApp::install
  }

  node 'server-defaults' inherits default {
   $sudoenv = 'custom_server'
  }

  node default {
   $sudoenv = 'default'
   include sudoers::config
  }

  class sudoers::config {
   file { /etc/sudoers:
     ensure = file,
     owner = root,
     group = root,
     mode = 440,
     source = puppet:///modules/sudoers/sudoers_
  $sudoenv,
   }
  }

  I have then created to files: sudoers_default and
  sudoers_custom_server

  I want to have a default sudoers file on most of my servers, but on a
  few others, I need a different one, but on serverA I only get the
  sudoers_default file. I have tried to create it as a template (still
  using the $sudoenv varialbe) but this does not have any effect. Only
  if I move the include sudoers::config to the 'server-defaults' node,
  then it works as I want.

  Being somewhat new to puppet, I really cant figure out how I can solve
  this task, but hopefully somebody can give some good hints?

  There isn't any of my default variables that I can use instead of
  $sudoenv.

  Hope somebody has hints

  Regards
  Thomas

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

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



Re: [Puppet Users] Re: Variable scope when having node inheritance

2011-08-05 Thread Denmat
This might shed some more light for you:

http://docs.puppetlabs.com/guides/troubleshooting.html#node-inheritance-and-variable-scope

Maybe you can create another class that handles 'server default'. Or create a 
custom fact that distinguishes these hosts from others.

I personally don't use my nodes to declare anything, I use a combination of 
classes, custom facts and extlookup of yaml files to describe my sites.

Cheers,
Den

On 05/08/2011, at 18:25, Thomas Rasmussen rasmussen.tho...@gmail.com wrote:

 Hi
 
 Thanks for the reply, that works, but I'd like to keep my include of
 the sudoers::config in my default node section, but if I do that, then
 I don't have the $sudoenv variable available at that time.
 
 Is there any way of overriding a previously include of a class? I
 tried to 'sudoers::config': sudoenv= $sudoenv, stage = install;  in
 my server-defaults node definition, but puppet gave me a duplicate
 error on include.
 
 I'm running 2.6.4 on both server and client side.
 
 Regards
 Thomas
 
 On Aug 5, 10:09 am, Denmat tu2bg...@gmail.com wrote:
 Hi,
 
 You setting sudoenv to default in the default node. That is not overridden 
 by subsequent node declarations.
 
 If you are using 2.6 and above I would pass a parameter to the sudoers class.
 
 class sudoers::config (env = 'default') {
  file { /etc/sudoers:
ensure = file,
owner = root,
group = root,
mode = 440,
source = puppet:///modules/sudoers/sudoers_
 ${env},
  }
 
 then maybe call like this.
 
 node 'server-defaults' inherits default {
  class {sudoers::config: env = 'custom_server' }
 }
 
 then
 
 node default {
  class {sudoers::config: }
 }
 
 That might help you.
 
 Cheers,
 Den
 On 05/08/2011, at 17:02, Thomas Rasmussen rasmussen.tho...@gmail.com wrote:
 
 
 
 
 
 
 
 Hi
 
 I'm having some trouble with the following setup:
 
 node 'serverA' inherits server-defaults {
  include myApp::install
 }
 
 node 'server-defaults' inherits default {
  $sudoenv = 'custom_server'
 }
 
 node default {
  $sudoenv = 'default'
  include sudoers::config
 }
 
 class sudoers::config {
  file { /etc/sudoers:
ensure = file,
owner = root,
group = root,
mode = 440,
source = puppet:///modules/sudoers/sudoers_
 $sudoenv,
  }
 }
 
 I have then created to files: sudoers_default and
 sudoers_custom_server
 
 I want to have a default sudoers file on most of my servers, but on a
 few others, I need a different one, but on serverA I only get the
 sudoers_default file. I have tried to create it as a template (still
 using the $sudoenv varialbe) but this does not have any effect. Only
 if I move the include sudoers::config to the 'server-defaults' node,
 then it works as I want.
 
 Being somewhat new to puppet, I really cant figure out how I can solve
 this task, but hopefully somebody can give some good hints?
 
 There isn't any of my default variables that I can use instead of
 $sudoenv.
 
 Hope somebody has hints
 
 Regards
 Thomas
 
 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/puppet-users?hl=en.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



[Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Claude
Here's what the log shows :

Processing FilesController#show (for 10.10.10.1 at 2011-08-05
08:11:17) [GET]
  Parameters: {action=show, controller=files,
file=70c1c6de6d4b1a02ec32b463e4d255b0}

Net::HTTPServerException (403 Forbidden):
  /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'
  lib/puppet_https.rb:34:in `get'
  app/controllers/files_controller.rb:23:in `show'
  sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
  passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
96:in `process_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
513:in `accept_and_process_next_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
274:in `main_loop'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:275:in `send'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
`start'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:149:in `start'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
`spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
`spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
`spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
`spawn_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
`handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
  passenger (3.0.7) helper-scripts/passenger-spawn-server:99

The Dashboard and the master are running under passenger.

On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
 On Thu, Aug 4, 2011 at 8:14 PM, Claude claude.duroc...@gmail.com wrote:
  Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the same
  server.

  When trying to display bucketed file in the Dashboard, I get the
  following error message (after clicking on the link '{md5}...) :

  We're sorry, but something went wrong. We've been notified about this
  issue and we'll take a look at it shortly.

 Ugh. I hate that error message.https://projects.puppetlabs.com/issues/8796

 Have a look at log/production.log and see what's going on.

 Can you try it against a puppet master in debug mode?











  Here's how I did the config :

  -puppet cert generate dashboard

  -Edit config/settings.yml :
  cn_name: 'dashboard'
  ca_crl_path: '/var/lib/puppet/ssl/ca/ca_crl.pem'
  ca_certificate_path: '/var/lib/puppet/ssl/ca/ca_crt.pem'
  certificate_path: '/var/lib/puppet/ssl/certs/dashboard.pem'
  private_key_path: '/var/lib/puppet/ssl/private_keys/dashboard.pem'
  public_key_path: '/var/lib/puppet/ssl/public_keys/dashboard.pem'

  -Edit site.pp :
  filebucket { main:
   server = puppet.myorg.internal,
   path = false,
  }
  File { backup = main }

 Try adding: path = false  ?











  -Restart PuppetDashboard

  -Generate a file update on a node.

  I've located bucketed files on the master so the problem seems to be
  between the dashboard and the master. How do I debug this?

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

 --
 Nigel Kersten
 Product Manager, Puppet Labs

 *Join us for **PuppetConf *
 http://www.bit.ly/puppetconfsig
 Sept 22/23 Portland, Oregon, USA.
 *
 *

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 

Re: [Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Nigel Kersten
On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com wrote:

 Here's what the log shows :

 Processing FilesController#show (for 10.10.10.1 at 2011-08-05
 08:11:17) [GET]
  Parameters: {action=show, controller=files,
 file=70c1c6de6d4b1a02ec32b463e4d255b0}

 Net::HTTPServerException (403 Forbidden):


Ahah. You're missing this step.

http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html

Once the puppet master is properly configured with a database-backed
inventory, edit your puppet master’s
auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html file
to grant Dashboard find and search access to /facts:

path /facts
auth yes
method find, search
allow dashboard


(change the allow line to reference your certificate identity you generated)



 /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'
  lib/puppet_https.rb:34:in `get'
  app/controllers/files_controller.rb:23:in `show'
  sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
  passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
 96:in `process_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
 513:in `accept_and_process_next_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
 274:in `main_loop'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:275:in `send'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
 `start_synchronously'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
 `start'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:149:in `start'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
 `spawn_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
 `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
 `start_synchronously'
  passenger (3.0.7) helper-scripts/passenger-spawn-server:99

 The Dashboard and the master are running under passenger.

 On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
  On Thu, Aug 4, 2011 at 8:14 PM, Claude claude.duroc...@gmail.com
 wrote:
   Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the same
   server.
 
   When trying to display bucketed file in the Dashboard, I get the
   following error message (after clicking on the link '{md5}...) :
 
   We're sorry, but something went wrong. We've been notified about this
   issue and we'll take a look at it shortly.
 
  Ugh. I hate that error message.
 https://projects.puppetlabs.com/issues/8796
 
  Have a look at log/production.log and see what's going on.
 
  Can you try it against a puppet master in debug mode?
 
 
 
 
 
 
 
 
 
 
 
   Here's how I did the config :
 
   -puppet cert generate dashboard
 
   -Edit config/settings.yml :
   cn_name: 'dashboard'
   ca_crl_path: '/var/lib/puppet/ssl/ca/ca_crl.pem'
   ca_certificate_path: '/var/lib/puppet/ssl/ca/ca_crt.pem'
   certificate_path: '/var/lib/puppet/ssl/certs/dashboard.pem'
   private_key_path: '/var/lib/puppet/ssl/private_keys/dashboard.pem'
   public_key_path: '/var/lib/puppet/ssl/public_keys/dashboard.pem'
 
   -Edit site.pp :
   filebucket { main:
server = puppet.myorg.internal,
path = false,
   }
   File { backup = main }
 
  Try adding: path = false  ?
 
 
 
 
 
 
 
 
 
 
 
   -Restart PuppetDashboard
 
   -Generate a file update on a node.
 
   I've located bucketed files on the master so the problem seems to be
   between the dashboard and the master. How do I debug this?
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Puppet Users group.
   To post to this 

[Puppet Users] Does Node Inheritance work for people?

2011-08-05 Thread Nigel Kersten
We have a bunch of problems people regularly run into with node inheritance,
and it's something we'd like to find a better solution for.

Is anyone using node inheritance and happy with how it works? If so, can you
describe your setup briefly?

-- 
Nigel Kersten
Product Manager, Puppet Labs

*Join us for **PuppetConf *
http://www.bit.ly/puppetconfsig
Sept 22/23 Portland, Oregon, USA.
*
*

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



Re: [Puppet Users] Re: Variable scope when having node inheritance

2011-08-05 Thread vagn scott

On 08/05/2011 04:25 AM, Thomas Rasmussen wrote:

Is there any way of overriding a previously include of a class?


Yes.  See 
http://docs.puppetlabs.com/guides/troubleshooting.html#class-inheritance-and-variable-scope


Something like (warning: untested):

Class[Sudoers::Config] { env =  'custom_server', }

Might do it.  Then again, nodes are not classes, so it might not work.  
In which case,

do your work in classes, and just use nodes to include the classes.

--
vagn

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



[Puppet Users] duplicated ssh host keys

2011-08-05 Thread Andreas Kuntzagk

Hi,

I'm managing hosts ssh keys by using exported resources.
I do this with this little config I found in the interWeb:

...
@@sshkey { $hostname,$ipaddress,$hostname-ext,$ipaddress_eth2: type = dsa, 
key = $sshdsakey }

...
Sshkey | |

Unfortunately the keys are duplicated every time puppet runs. Is this a bug in 
puppet or is that config bad?


regards, Andreas

--
Andreas Kuntzagk
SystemAdministrator
MDC Berlin / BIMSB
Tel.: +49 30 9406 2997

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



Re: [Puppet Users] Does Node Inheritance work for people?

2011-08-05 Thread R.I.Pienaar


- Original Message -
 On 08/05/2011 09:33 AM, Nigel Kersten wrote:
  We have a bunch of problems people regularly run into with node
  inheritance, and it's something we'd like to find a better solution
  for.
 
 Let me guess:
 
  - nodes are not classes
  - node scope is not global scope
 
 Is there something else that trips people up?

node default {
  $foo = 1

  notify{$foo: }
}

node foo inherits default {
  $foo = 2
}

this will print 1, inheritance is badly designed since this is a common pattern 
 

But also now I think $foo should be considered a top level variable in 2.7
when its not, making node variables more or less useless.

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



Re: [Puppet Users] Does Node Inheritance work for people?

2011-08-05 Thread vagn scott

On 08/05/2011 10:21 AM, R.I.Pienaar wrote:

But also now I think $foo should be considered a top level variable in 2.7
when its not, making node variables more or less useless.
   


I like it that node variables are local and private.

node default {

$foo = $backupdir/${hostname}

backup { $foo: when = 'daily', }
archive { $foo: when = 'weekly', }
}

If $foo were global it might have unintended side effects.

I think one could make a case for getting rid of global variables entirely.

--
vagn

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



Re: [Puppet Users] Does Node Inheritance work for people?

2011-08-05 Thread Bruce Richardson
On Fri, Aug 05, 2011 at 06:33:12AM -0700, Nigel Kersten wrote:
 We have a bunch of problems people regularly run into with node inheritance,
 and it's something we'd like to find a better solution for.
 
 Is anyone using node inheritance and happy with how it works? If so, can you
 describe your setup briefly?

I use node inheritance purely for setting variables that are relevant to
environments or roles.  So I'll have a production node or a staging node
and the host node may inherit from that, or from a production webservers node
which inherits from production.  I give all the role and environement
based nodes names ending in .template to avoid potential name clashes.

I use class inheritance for all the configuration and include classes in
the actual host node.  I use role-based classes to tie things together
and minimise the number of classes.  I make sure we never, ever include
a class in anything except the host node (not in any of the template
nodes from which it inherits), so that we always have the option to
override default values etc. without having to specially design our
classes for every eventuality.

So I'll have a webservers role class.  This gives me things like

node web01 inherits webserver.production.template {
enabled_sites = [ 'test', 'sample', 'whatever' ]
include webserver
}

This is the only way I have found to make puppet work for me
practically.  I don't like it much, but it works.  The inheritance model
is, without question, my absolute least favourite thing about Puppet.
Most hated thing, to be accurate.  I hate having to specify things at
the node level when the only things declared at the node level should be
the things which are *unique* to the node.  I don't much like having to
have parallel node and class inheritance.

A more traditional inheritance model would be much more useful for both
nodes and classes.  Oh, and as said by somebody else already, I have
always considered nodes to be a redundant duplication.  Nodes are just a
special case of classes and only serve to complicate Puppet's structure.
I appreciate the practical reasons why they were used in the first
place, but I think Puppet would benefit from scrapping nodes and
implementing a better inheritance model for classes.  I appreciate
that's quite something of a redesign and would make optimisation more
difficult (at lest, starting from where we are now).

-- 
Bruce

A problem shared brings the consolation that someone else is now
feeling as miserable as you.

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



Re: [Puppet Users] duplicated ssh host keys

2011-08-05 Thread Stefan Schulte
On Fri, Aug 05, 2011 at 03:51:36PM +0200, Andreas Kuntzagk wrote:
 Hi,
 
 I'm managing hosts ssh keys by using exported resources.
 I do this with this little config I found in the interWeb:
 
 ...
 @@sshkey { $hostname,$ipaddress,$hostname-ext,$ipaddress_eth2: type = dsa, 
 key = $sshdsakey }
 ...
 Sshkey | |

You should only use $hostname as the resource title. What you want to do
is

@@sshkey { $hostname:
  ensure   = present,
  type = dsa,
  key  = $sshdsakey,
  host_aliases = [ $ipaddress, $hostname-ext, $ipaddress_eth2 ],
}

The problem is, that you specified host_aliases in the title and puppet
doesnt warn you about that.  This should be fixed in 2.7.0
(https://projects.puppetlabs.com/issues/2495)

-Stefan


pgpF6nasgjWNl.pgp
Description: PGP signature


[Puppet Users] Re: Does Node Inheritance work for people?

2011-08-05 Thread jcbollinger


On Aug 5, 8:33 am, Nigel Kersten ni...@puppetlabs.com wrote:
 We have a bunch of problems people regularly run into with node inheritance,
 and it's something we'd like to find a better solution for.

 Is anyone using node inheritance and happy with how it works? If so, can you
 describe your setup briefly?


I am using node inheritance and I am happy with how it works, within
the limited scope of the things I do with it.

My setup is fairly simple:
- I use a nodes.pp manifest and no ENC.
- I have only two levels in my inheritance hierarchy, which correspond
approximately to machine type defaults (workstation vs. server) on one
level and individual machines on the other level.  All per-machine
node definitions inherit from one of the machine type definitions.
- My node definitions do nothing but include classes.  There are no
variable definitions or resource declarations.


As I tell people here from time to time, node (single-) inheritance
doesn't fit the problem space very well because few sites admit a
satisfactory node taxonomy of any complexity.  Moreover, a lot of the
things one might conceive of doing via node inheritance can be done as
well or better with classes (classes in general, not necessarily class
inheritance).  If I were using an ENC then I would have no use for
node inheritance: I would achieve everything I currently get from node
inheritance through my ENC implementation instead.


John

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



[Puppet Users] Dashboard Delayed Workers Error: Mysql::Error: MySQL server has gone away

2011-08-05 Thread dave-stfu
Hello

Recently, I've upgraded the Dashboard from 1.2rc3 to 1.2rc5. Now, the
delayed workers are dying right after I start them. The production.log
says:

Delayed::Backend::ActiveRecord::Job Update (0.0ms)   Mysql::Error:
MySQL server has gone away: UPDATE `delayed_jobs` SET locked_by =
null, locked_at = null WHERE (locked_by = 'delayed_job.1 host:puppet
pid:16839')
#ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone
away: UPDATE `delayed_jobs` SET locked_by = null, locked_at = null
WHERE (locked_by = 'delayed_job.1 host:puppet pid:16839') 

The Dashboard itself is running smoothly. Also, running rake
jobs:work runs without any problems - it does the delayed jobs. The
settings are the same as in rc3 (user, permissions, db config).

Could this be the result of updated gems in rc5?

Cheers!
Dave

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



[Puppet Users] Re: Does Node Inheritance work for people?

2011-08-05 Thread jcbollinger


On Aug 5, 9:38 am, vagn scott vagnsc...@gmail.com wrote:

 I think one could make a case for getting rid of global variables entirely.

Sort of.  There are alternatives that could fill the same role, such
as class variables of a class that every node includes, so yes, you
could dump global variables themselves, but I can't see failing to
support that role somehow.  With that said, then, the biggest
advantage of global variables may be that they are easy for manifest
writers to use compared to the available alternatives.


John

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



[Puppet Users] Open Source Team iteration planning summary 2011-08-05

2011-08-05 Thread Josh Cooper
We completed a number of tasks that allow us to run the facter and spec
tests on Windows as part of our continuous integration system[1]. All of
the tests now pass on Windows Server 2008 R2, with exception of tests
that are marked as fails_on_windows. These tests are known to fail
because we have not yet implemented the necessary providers, e.g. user
provider[2], or due to bugs that have been identified and are in our
backlog to fix. See #8663, #8381, #8392 for more details.

The host provider now works on Windows (#8644). This was fairly trivial
to implement. One thing to be aware of, however, is that under 2008, the
hosts file can only be written to when running with elevated privileges. In
other words, you have to Run as administrator.

The facter and puppet install.rb scripts now default their config
directory to the ProgramData known folder[3] on Windows (#8660). On
2003 and prior this corresponds to %ALLUSERSPROFILE%\Application Data,
and on Vista and later this corresponds to
%SYSTEMDRIVE%\ProgramData. The full path of the conf directory is then
ProgramData\PuppetLabs\puppet\etc.

The vcsrepo type and providers have been reverted from puppet core as
they are available as a separate module.

We have changed our preferred method for making contributions to using
GitHub pull requests. We will still be accepting changes via 'rake
mail_patches', etc. See CONTRIBUTION.md[4] for more details. Also note
that you do not need to resubmit patches that were made via rake
mail_patches.

Completed items:

 * #8663 - Get spec tests running on Windows (Planned for: Telly)

 * #8392 - Confine master tests to not run on Windows (Planned for:
Telly)

 * #8644 - Host provider on Windows (Planned for: Telly)

 * #8660 - Change default install directories on Windows (Planned for:
Telly)

Current backlog:

 * #8740 - Puppet resource file is broken

 * #8408 - Local user provider for Windows

 * #8409 - Local group provider for Windows

 * #8439 - Basic facter on Windows

 * #8414 - Task scheduler type/provider for Windows

 * #8410 - Exec provider for Windows

 * #8411 - File type working on Windows

 * #8412 - MSI package provider for Windows

 * #8413 - Ability to run Puppet as an agent on Windows

[1] https://jenkins.puppetlabs.com

[2] https://projects.puppetlabs.com/issues/8408

[3] http://msdn.microsoft.com/en-us/library/dd378457(v=vs.85).aspx

[4] https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md

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



[Puppet Users] Re: Variable scope when having node inheritance

2011-08-05 Thread jcbollinger


On Aug 5, 3:25 am, Thomas Rasmussen rasmussen.tho...@gmail.com
wrote:
 Hi

 Thanks for the reply, that works, but I'd like to keep my include of
 the sudoers::config in my default node section, but if I do that, then
 I don't have the $sudoenv variable available at that time.

 Is there any way of overriding a previously include of a class? I
 tried to 'sudoers::config': sudoenv= $sudoenv, stage = install;  in
 my server-defaults node definition, but puppet gave me a duplicate
 error on include.


Not to my knowledge, no.  If Vagn's suggestion for that works then
I'll be quite surprised, and also very interested in hearing about it.


 I'm running 2.6.4 on both server and client side.


Another alternative is to set the variable by means other than the
node declaration.  The extlookup() function can be quite useful for
this sort of thing.  Be aware that it looks like you are going to
*have* to do something along these lines in order to upgrade to 2.8.x
(when that arrives).

Yet another alternative might be to prune your node inheritance tree
into two, one rooted at 'default' and a second rooted at 'server-
default'.  Each of those node declarations would define $sudoenv and
include sudoers::config.  If you want to adhere carefully to a DRY
approach, then you can take everything common to the two node types,
wrap it up in a class, and have each of the to default nodes include
it.


John

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



Re: [Puppet Users] Re: Does Node Inheritance work for people?

2011-08-05 Thread vagn scott

On 08/05/2011 01:18 PM, jcbollinger wrote:


On Aug 5, 9:38 am, vagn scottvagnsc...@gmail.com  wrote:

   

I think one could make a case for getting rid of global variables entirely.
 

Sort of.  There are alternatives that could fill the same role, such
as class variables of a class that every node includes, so yes, you
could dump global variables themselves, but I can't see failing to
support that role somehow.  With that said, then, the biggest
advantage of global variables may be that they are easy for manifest
writers to use compared to the available alternatives.


John

   

After writing that I recalled that I like
doing this:


#! /usr/bin/puppet apply
$prog_name = shebang.pp
notice(running: $program_name)


so I take back all the nasty things I said
about global variables.

But I don't use them in my modules, and
I would not recommend using them for anything
non-trivial.

--
vagn

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



[Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Claude
I finally made it working by modifying auth.conf like this :

path /facts
auth any
method find, search
allow *

path /file_bucket_file/md5
auth no
method find, save
allow *

On 5 août, 09:31, Nigel Kersten ni...@puppetlabs.com wrote:
 On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com wrote:
  Here's what the log shows :

  Processing FilesController#show (for 10.10.10.1 at 2011-08-05
  08:11:17) [GET]
   Parameters: {action=show, controller=files,
  file=70c1c6de6d4b1a02ec32b463e4d255b0}

  Net::HTTPServerException (403 Forbidden):

 Ahah. You're missing this step.

 http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html

 Once the puppet master is properly configured with a database-backed
 inventory, edit your puppet master’s
 auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html file
 to grant Dashboard find and search access to /facts:

 path /facts
 auth yes
 method find, search
 allow dashboard

 (change the allow line to reference your certificate identity you generated)

  /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'



   lib/puppet_https.rb:34:in `get'
   app/controllers/files_controller.rb:23:in `show'
   sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
   passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
  96:in `process_request'
   passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
  513:in `accept_and_process_next_request'
   passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
  274:in `main_loop'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:321:in `start_request_handler'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:275:in `send'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:275:in `handle_spawn_application'
   passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:270:in `handle_spawn_application'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `__send__'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `server_main_loop'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
  `start_synchronously'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
  `start'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:149:in `start'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:132:in `lookup_or_add'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:82:in `synchronize'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:79:in `synchronize'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
  `spawn_application'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
  `handle_spawn_application'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `__send__'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `server_main_loop'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
  `start_synchronously'
   passenger (3.0.7) helper-scripts/passenger-spawn-server:99

  The Dashboard and the master are running under passenger.

  On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
   On Thu, Aug 4, 2011 at 8:14 PM, Claude claude.duroc...@gmail.com
  wrote:
Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the same
server.

When trying to display bucketed file in the Dashboard, I get the
following error message (after clicking on the link '{md5}...) :

We're sorry, but something went wrong. We've been notified about this
issue and we'll take a look at it shortly.

   Ugh. I hate that error message.
 https://projects.puppetlabs.com/issues/8796

   Have a look at log/production.log and see what's going on.

   Can you try it against a puppet master in debug mode?

Here's how I did the config :

-puppet cert generate dashboard

-Edit config/settings.yml :
cn_name: 'dashboard'
ca_crl_path: '/var/lib/puppet/ssl/ca/ca_crl.pem'
ca_certificate_path: '/var/lib/puppet/ssl/ca/ca_crt.pem'
certificate_path: '/var/lib/puppet/ssl/certs/dashboard.pem'
private_key_path: '/var/lib/puppet/ssl/private_keys/dashboard.pem'
public_key_path: '/var/lib/puppet/ssl/public_keys/dashboard.pem'

-Edit site.pp :
filebucket { main:
 server = puppet.myorg.internal,
 path = false,
}
File { backup = main }

   Try adding: path = false  ?

-Restart PuppetDashboard

-Generate a file 

Re: [Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Nigel Kersten
On Fri, Aug 5, 2011 at 11:24 AM, Claude claude.duroc...@gmail.com wrote:

 I finally made it working by modifying auth.conf like this :

 path /facts
 auth any
 method find, search
 allow *

 path /file_bucket_file/md5
 auth no
 method find, save
 allow *


That's going to allow everyone, and you really should lock it down to just
the dashboard itself.



 On 5 août, 09:31, Nigel Kersten ni...@puppetlabs.com wrote:
  On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com
 wrote:
   Here's what the log shows :
 
   Processing FilesController#show (for 10.10.10.1 at 2011-08-05
   08:11:17) [GET]
Parameters: {action=show, controller=files,
   file=70c1c6de6d4b1a02ec32b463e4d255b0}
 
   Net::HTTPServerException (403 Forbidden):
 
  Ahah. You're missing this step.
 
  http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html
 
  Once the puppet master is properly configured with a database-backed
  inventory, edit your puppet master’s
  auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html file
  to grant Dashboard find and search access to /facts:
 
  path /facts
  auth yes
  method find, search
  allow dashboard
 
  (change the allow line to reference your certificate identity you
 generated)
 
   /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'
 
 
 
lib/puppet_https.rb:34:in `get'
app/controllers/files_controller.rb:23:in `show'
sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
   96:in `process_request'
passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
   513:in `accept_and_process_next_request'
passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
   274:in `main_loop'
passenger (3.0.7) lib/phusion_passenger/classic_rails/
   application_spawner.rb:321:in `start_request_handler'
passenger (3.0.7) lib/phusion_passenger/classic_rails/
   application_spawner.rb:275:in `send'
passenger (3.0.7) lib/phusion_passenger/classic_rails/
   application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.7) lib/phusion_passenger/classic_rails/
   application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
   `__send__'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
   `server_main_loop'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
   `start_synchronously'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
   `start'
passenger (3.0.7) lib/phusion_passenger/classic_rails/
   application_spawner.rb:149:in `start'
passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
   `spawn_rails_application'
passenger (3.0.7) lib/phusion_passenger/
   abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
   `spawn_rails_application'
passenger (3.0.7) lib/phusion_passenger/
   abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.7) lib/phusion_passenger/
   abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
   `spawn_rails_application'
passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
   `spawn_application'
passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
   `handle_spawn_application'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
   `__send__'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
   `server_main_loop'
passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
   `start_synchronously'
passenger (3.0.7) helper-scripts/passenger-spawn-server:99
 
   The Dashboard and the master are running under passenger.
 
   On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
On Thu, Aug 4, 2011 at 8:14 PM, Claude claude.duroc...@gmail.com
   wrote:
 Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the same
 server.
 
 When trying to display bucketed file in the Dashboard, I get the
 following error message (after clicking on the link '{md5}...) :
 
 We're sorry, but something went wrong. We've been notified about
 this
 issue and we'll take a look at it shortly.
 
Ugh. I hate that error message.
  https://projects.puppetlabs.com/issues/8796
 
Have a look at log/production.log and see what's going on.
 
Can you try it against a puppet master in debug mode?
 
 Here's how I did the config :
 
 -puppet cert generate dashboard
 
 -Edit config/settings.yml :
 cn_name: 'dashboard'
 ca_crl_path: '/var/lib/puppet/ssl/ca/ca_crl.pem'
 ca_certificate_path: '/var/lib/puppet/ssl/ca/ca_crt.pem'
 certificate_path: '/var/lib/puppet/ssl/certs/dashboard.pem'
 private_key_path: 

[Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Claude
Using allow dashboard in /facts then facter data is not displayed in
the dashboard (Could not retrieve facts from inventory service: 403
Forbidden).

Also not using * in /file_bucket_file/md5 forbids clients from
uploading bucketed files.

Am I missing something here?

On 5 août, 15:09, Nigel Kersten ni...@puppetlabs.com wrote:
 On Fri, Aug 5, 2011 at 11:24 AM, Claude claude.duroc...@gmail.com wrote:
  I finally made it working by modifying auth.conf like this :

  path /facts
  auth any
  method find, search
  allow *

  path /file_bucket_file/md5
  auth no
  method find, save
  allow *

 That's going to allow everyone, and you really should lock it down to just
 the dashboard itself.





  On 5 août, 09:31, Nigel Kersten ni...@puppetlabs.com wrote:
   On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com
  wrote:
Here's what the log shows :

Processing FilesController#show (for 10.10.10.1 at 2011-08-05
08:11:17) [GET]
 Parameters: {action=show, controller=files,
file=70c1c6de6d4b1a02ec32b463e4d255b0}

Net::HTTPServerException (403 Forbidden):

   Ahah. You're missing this step.

  http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html

   Once the puppet master is properly configured with a database-backed
   inventory, edit your puppet master’s
   auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html file
   to grant Dashboard find and search access to /facts:

   path /facts
   auth yes
   method find, search
   allow dashboard

   (change the allow line to reference your certificate identity you
  generated)

    /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'

 lib/puppet_https.rb:34:in `get'
 app/controllers/files_controller.rb:23:in `show'
 sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
 passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
96:in `process_request'
 passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
513:in `accept_and_process_next_request'
 passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:
274:in `main_loop'
 passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:321:in `start_request_handler'
 passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:275:in `send'
 passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:275:in `handle_spawn_application'
 passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
 passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:270:in `handle_spawn_application'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
`start'
 passenger (3.0.7) lib/phusion_passenger/classic_rails/
application_spawner.rb:149:in `start'
 passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
`spawn_rails_application'
 passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:132:in `lookup_or_add'
 passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
`spawn_rails_application'
 passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:82:in `synchronize'
 passenger (3.0.7) lib/phusion_passenger/
abstract_server_collection.rb:79:in `synchronize'
 passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
`spawn_rails_application'
 passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
`spawn_application'
 passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
`handle_spawn_application'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
 passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
 passenger (3.0.7) helper-scripts/passenger-spawn-server:99

The Dashboard and the master are running under passenger.

On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
 On Thu, Aug 4, 2011 at 8:14 PM, Claude claude.duroc...@gmail.com
wrote:
  Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the same
  server.

  When trying to display bucketed file in the Dashboard, I get the
  following error message (after clicking on the link '{md5}...) :

  We're sorry, but something went wrong. We've been notified about
  this
  issue and we'll take a look at it shortly.

 Ugh. I hate that error message.
   https://projects.puppetlabs.com/issues/8796

 Have a look at log/production.log and see what's going on.

 Can you try it against a 

Re: [Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Nigel Kersten
On Fri, Aug 5, 2011 at 12:22 PM, Claude claude.duroc...@gmail.com wrote:

 Using allow dashboard in /facts then facter data is not displayed in
 the dashboard (Could not retrieve facts from inventory service: 403
 Forbidden).


Is your certname actually 'dashboard' or did you generate a different
certname?



 Also not using * in /file_bucket_file/md5 forbids clients from
 uploading bucketed files.


Hrm. That hasn't been necessary whenever I've set it up. We might have to
dig into why this is.



 Am I missing something here?






 On 5 août, 15:09, Nigel Kersten ni...@puppetlabs.com wrote:
  On Fri, Aug 5, 2011 at 11:24 AM, Claude claude.duroc...@gmail.com
 wrote:
   I finally made it working by modifying auth.conf like this :
 
   path /facts
   auth any
   method find, search
   allow *
 
   path /file_bucket_file/md5
   auth no
   method find, save
   allow *
 
  That's going to allow everyone, and you really should lock it down to
 just
  the dashboard itself.
 
 
 
 
 
   On 5 août, 09:31, Nigel Kersten ni...@puppetlabs.com wrote:
On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com
   wrote:
 Here's what the log shows :
 
 Processing FilesController#show (for 10.10.10.1 at 2011-08-05
 08:11:17) [GET]
  Parameters: {action=show, controller=files,
 file=70c1c6de6d4b1a02ec32b463e4d255b0}
 
 Net::HTTPServerException (403 Forbidden):
 
Ahah. You're missing this step.
 
   http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html
 
Once the puppet master is properly configured with a database-backed
inventory, edit your puppet master’s
auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html
 file
to grant Dashboard find and search access to /facts:
 
path /facts
auth yes
method find, search
allow dashboard
 
(change the allow line to reference your certificate identity you
   generated)
 
 /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'
 
  lib/puppet_https.rb:34:in `get'
  app/controllers/files_controller.rb:23:in `show'
  sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
  passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
 96:in `process_request'
  passenger (3.0.7)
 lib/phusion_passenger/abstract_request_handler.rb:
 513:in `accept_and_process_next_request'
  passenger (3.0.7)
 lib/phusion_passenger/abstract_request_handler.rb:
 274:in `main_loop'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:275:in `send'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in
 `safe_fork'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
 `start_synchronously'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
 `start'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/
 application_spawner.rb:149:in `start'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/
 abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
 `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
 `spawn_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
 `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
 `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
 `start_synchronously'
  passenger (3.0.7) helper-scripts/passenger-spawn-server:99
 
 The Dashboard and the master are running under passenger.
 
 On 5 août, 01:46, Nigel Kersten ni...@puppetlabs.com wrote:
  On Thu, Aug 4, 2011 at 8:14 PM, Claude 
 claude.duroc...@gmail.com
 wrote:
   Using Puppet-DashBoard 1.2Rc3 with Puppet master 2.7.1 on the
 same
   server.
 
   When trying to display bucketed file in the 

[Puppet Users] autosigning not working

2011-08-05 Thread newguy
Hi guys I want to auto sign the clients coming in, in my autosign.conf
file I tried * ( to allow all), it didnt worked, I also tried pattern
like: qa-abc-wrk*.com it also didnt worked.
Client says invalid pattern for qa-abc-wrk*.com.

Can any one please help me with this.

Thanks

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



[Puppet Users] autosigning not working

2011-08-05 Thread newguy
Hi guys I want to auto sign the clients coming in, in my autosign.conf
file I tried * ( to allow all), it didnt worked, I also tried pattern
like: qa-abc-wrk*.com it also didnt worked.
Client says invalid pattern for qa-abc-wrk*.com.

Can any one please help me with this.

Thanks

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



[Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-05 Thread Claude
Yes, the certname is 'dashboard' :

server:/var/lib/puppet # ll ssl/certs/
total 12
-rw-r--r-- 1 puppet root879 2011-07-07 11:03 ca.pem
-rw-r- 1 puppet root887 2011-08-05 10:05 dashboard.pem

server:/usr/share/puppet-dashboard # puppet cert --list --all
+ dashboard (BD:FC:15:2F:06:7D:43:2B:D2:88:B2:FD:86:ED:61:5D)

Also I noticed I can only read the first file, the changed file, not
the second, the original (content changed '{md5}
70c1c6de6d4b1a02ec32b463e4d255b0' to '{md5}
78124298c2b4c1e63658599a2c208853') :

info: FileBucket read 70c1c6de6d4b1a02ec32b463e4d255b0
info: Could not find file_bucket_file for
'md5/78124298c2b4c1e63658599a2c208853'




On 5 août, 15:25, Nigel Kersten ni...@puppetlabs.com wrote:
 On Fri, Aug 5, 2011 at 12:22 PM, Claude claude.duroc...@gmail.com wrote:
  Using allow dashboard in /facts then facter data is not displayed in
  the dashboard (Could not retrieve facts from inventory service: 403
  Forbidden).

 Is your certname actually 'dashboard' or did you generate a different
 certname?



  Also not using * in /file_bucket_file/md5 forbids clients from
  uploading bucketed files.

 Hrm. That hasn't been necessary whenever I've set it up. We might have to
 dig into why this is.





  Am I missing something here?

  On 5 août, 15:09, Nigel Kersten ni...@puppetlabs.com wrote:
   On Fri, Aug 5, 2011 at 11:24 AM, Claude claude.duroc...@gmail.com
  wrote:
I finally made it working by modifying auth.conf like this :

path /facts
auth any
method find, search
allow *

path /file_bucket_file/md5
auth no
method find, save
allow *

   That's going to allow everyone, and you really should lock it down to
  just
   the dashboard itself.

On 5 août, 09:31, Nigel Kersten ni...@puppetlabs.com wrote:
 On Fri, Aug 5, 2011 at 5:14 AM, Claude claude.duroc...@gmail.com
wrote:
  Here's what the log shows :

  Processing FilesController#show (for 10.10.10.1 at 2011-08-05
  08:11:17) [GET]
   Parameters: {action=show, controller=files,
  file=70c1c6de6d4b1a02ec32b463e4d255b0}

  Net::HTTPServerException (403 Forbidden):

 Ahah. You're missing this step.

http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html

 Once the puppet master is properly configured with a database-backed
 inventory, edit your puppet master’s
 auth.confhttp://docs.puppetlabs.com/guides/rest_auth_conf.html
  file
 to grant Dashboard find and search access to /facts:

 path /facts
 auth yes
 method find, search
 allow dashboard

 (change the allow line to reference your certificate identity you
generated)

  /usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'

   lib/puppet_https.rb:34:in `get'
   app/controllers/files_controller.rb:23:in `show'
   sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
   passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:
  96:in `process_request'
   passenger (3.0.7)
  lib/phusion_passenger/abstract_request_handler.rb:
  513:in `accept_and_process_next_request'
   passenger (3.0.7)
  lib/phusion_passenger/abstract_request_handler.rb:
  274:in `main_loop'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:321:in `start_request_handler'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:275:in `send'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:275:in `handle_spawn_application'
   passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in
  `safe_fork'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:270:in `handle_spawn_application'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `__send__'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
  `server_main_loop'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
  `start_synchronously'
   passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in
  `start'
   passenger (3.0.7) lib/phusion_passenger/classic_rails/
  application_spawner.rb:149:in `start'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:132:in `lookup_or_add'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:82:in `synchronize'
   passenger (3.0.7) lib/phusion_passenger/
  abstract_server_collection.rb:79:in `synchronize'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
  `spawn_rails_application'
   passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
  `spawn_application'
   passenger 

[Puppet Users] Re: Dashboard Delayed Workers Error: Mysql::Error: MySQL server has gone away

2011-08-05 Thread Bruno Leon
I can confirm the exact same issue.

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



Re: [Puppet Users] Dashboard Delayed Workers Error: Mysql::Error: MySQL server has gone away

2011-08-05 Thread Russell Jackson

On 08/05/2011 02:59 AM, dave-stfu wrote:

Hello

Recently, I've upgraded the Dashboard from 1.2rc3 to 1.2rc5. Now, the
delayed workers are dying right after I start them. The production.log
says:

Delayed::Backend::ActiveRecord::Job Update (0.0ms)   Mysql::Error:
MySQL server has gone away: UPDATE `delayed_jobs` SET locked_by =
null, locked_at = null WHERE (locked_by = 'delayed_job.1 host:puppet
pid:16839')
#ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone
away: UPDATE `delayed_jobs` SET locked_by = null, locked_at = null
WHERE (locked_by = 'delayed_job.1 host:puppet pid:16839')

The Dashboard itself is running smoothly. Also, running rake
jobs:work runs without any problems - it does the delayed jobs. The
settings are the same as in rc3 (user, permissions, db config).

Could this be the result of updated gems in rc5?

Cheers!
Dave



This issued was fixed for me after I did a pull on the 1.2rc branch this 
morning.


--
Russell A Jackson r...@csub.edu
Network Analyst
California State University, Bakersfield

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



Re: [Puppet Users] autosigning not working

2011-08-05 Thread Denmat
Hi,

This should answer your questions:

http://docs.puppetlabs.com/guides/configuring.html#autosignconf

You can only specify subdomains, not globs like you are trying to do.

Cheers,
Den

On 06/08/2011, at 5:33, newguy aimanparv...@gmail.com wrote:

 Hi guys I want to auto sign the clients coming in, in my autosign.conf
 file I tried * ( to allow all), it didnt worked, I also tried pattern
 like: qa-abc-wrk*.com it also didnt worked.
 Client says invalid pattern for qa-abc-wrk*.com.
 
 Can any one please help me with this.
 
 Thanks
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



[Puppet Users] Re: How to query other classes/defines configurations in the same node?

2011-08-05 Thread John Martin
Case 1:

I have gone to a model where I have a manifests/conf directory akin
to /etc which contains the configuration for each service and
application.  In your case I would have a zabbix_conf class and in the
node, I would simple reference the var $zabbix_conf::server_ip.

The beauty of this is my clients know to just go to the conf dir to
make config changes.

Case 2:

I run into this one often and simply get around it with a defined
test:

if ! defined File[/foo] { file { ...} }

In some other situations I use virtual resources such as for
application/services users.  I again have a Conf file that defines the
resource and later realize it.

class users {
   @user { 'jboss': }
}

Then in various places I can safely instanciate the resource:

realize users::user['jboss']

Case 3:

A) utilize storedconfigs.

B) create a function that is called by the node on each update which
writes to the puppet file server directory.  The dynamic content can
be passed to the function using the template or inline_template
functions.

HTH.

John



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