Re: [Puppet Users] Issues switching over to using environments

2011-10-12 Thread Aaron Grewell
No, as I understand it environments are designed to be completely
independent of one another.  The idea is that you wouldn't want changes in
testing or qa to be able to affect production for any reason.  So it's
expected that there would be duplication across environments due to SLA
differences between the environments.

On Tue, Oct 11, 2011 at 6:29 PM, Gonzalo Servat gser...@gmail.com wrote:

 Thanks Dan. I thought Puppet may have a way to automagically search for a
 file based on environment first (e.g. modules/nfs/$environment/foo), then a
 default as specified by source (e.g. modules/nfs/foo). I can see how what
 you pasted helps, but it could become tedious having to specify the search
 path in various places.


 On Wed, Oct 12, 2011 at 12:14 PM, Dan White y...@comcast.net wrote:

 http://docs.puppetlabs.com/references/stable/type.html#file

 under source

 If you specify multiple file sources for a file, then the first source
 that exists will be used. This allows you to specify what amount to search
 paths for files:

   file { /path/to/my/file:
 source = [
   /modules/nfs/files/file.$host,
   /modules/nfs/files/file.$operatingsystem,
   /modules/nfs/files/file
 ]
   }

 This will use the first found file as the source.

 On Oct 11, 2011, at 5:43 PM, Gonzalo Servat wrote:

 Somewhat related to this, is there a way for Puppet to source files in
 this manner:

 First: /etc/puppet/modules/module/$environment/file
 Default: /etc/puppet/modules/module/file

 Just to avoid having the same directory structure under
 /etc/puppet/$environment/ as Deven has done.

 Best regards,
 Gonzalo

 On Wed, Oct 12, 2011 at 8:26 AM, Deven Phillips deven.phill...@gmail.com
  wrote:

 Jacob,

That was the problem!! Thanks so much for the help. And Aaron and
 everyone else as well. Much appreciated!!

 Deven

 On Tue, Oct 11, 2011 at 3:56 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Trying that out now.. I will respond back in a bit with results.
 
  Thanks!!!
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com
 wrote:
  The layout should look something more like this:
 
  
 /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config
 
  With the source lines looking like:
   puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config
 
 
  If you wanted 'generic_node' to be the name of the module, then you'd
  have the layout as
 
   /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config
 
  and the source line as
 
   puppet://lou1/modules/generic_node/etc/ssh/sshd_config
 
  --
  Jacob Helwig
 
  On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
  Date: Tue, 11 Oct 2011 15:26:16 -0400
  From: Deven Phillips deven.phill...@gmail.com
  To: puppet-users@googlegroups.com
  Subject: Re: [Puppet Users] Issues switching over to using
 environments
  Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com
 
  The manifest which calls this looks like:
 
  file {/etc/ssh/sshd_config:
  owner   = root,
  group   = root,
  mode= 0644,
  ensure  = present,
  source  =
  puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
  require = Package['openssh'],
  notify  = Service['ssh'],
  }
 
  And the current error on the agent node shows:
 
  err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
  evaluate: Could not retrieve information from environment production
  source(s)
 puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
  at /etc/puppet/prod/manifests/classes/ssh.pp:55
 
 
  TIA,
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
  deven.phill...@gmail.com wrote:
   Nope, that didn't seem to help the way I tried it... So, here's my
 layout:
  
   /etc/puppet/
prod/
   modules/
files/
   generic_node/
  
 etc/
  
   ssh/
  
 sshd_config
  
   From a machine which is using production as it's environment, and
   production points to prod/modules for it's modules; I still get
   errors trying to get the sshd_config file.
  
   TIA!!
  
   Deven
  
 
 

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

[Puppet Users] Issues switching over to using environments

2011-10-11 Thread Deven Phillips
Hello all,

I have been searching through the list archives, but I have yet to find
an answer to my question. The problem I am having is this:

1. I have been using puppet without environments for some time now and it
works properly
2. I am trying to reconfigure to use environments, and I am getting errors
with plugins not getting sync'd.

The error I see on the agent node is:

err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
information from environment production source(s) puppet://lou1/plugins
notice: /File[/var/lib/puppet/lib/puppet]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider]: Skipping because of
failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/type]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Skipping because
of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Skipping
because of failed dependencies

On the puppet master, I changed my puppet.conf from:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server = lou1
certname = lou1

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
modulepath=/etc/puppet/modules
storeconfigs=true
dbadapter=postgresql
dbuser=foreman
dbpassword=foreman
dbserver=localhost
dbname=foreman
reports=log, foreman
certname=lou1
server=lou1

To:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/prod/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server = lou1
certname = lou1

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
modulepath=/etc/puppet/prod/modules
storeconfigs=true
dbadapter=postgresql
dbuser=foreman
dbpassword=foreman
dbserver=localhost
dbname=foreman
reports=log, foreman
certname=lou1
server=lou1

[production]
manifest = 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Adrien Thebo
When I've run into this error, it was due to the environment
manifestdir/modulepath/templatedir not being set correctly or not
existing. Are you certain that those directories exist? What
environment is demonstrating this?

On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
deven.phill...@gmail.com wrote:
 Hello all,
     I have been searching through the list archives, but I have yet to find
 an answer to my question. The problem I am having is this:
 1. I have been using puppet without environments for some time now and it
 works properly
 2. I am trying to reconfigure to use environments, and I am getting errors
 with plugins not getting sync'd.
 The error I see on the agent node is:
 err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
 information from environment production source(s) puppet://lou1/plugins
 notice: /File[/var/lib/puppet/lib/puppet]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider]: Skipping because of
 failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Skipping because
 of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Skipping
 because of failed dependencies
 On the puppet master, I changed my puppet.conf from:
 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/etc/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 templatedir=$confdir/templates
 prerun_command=/etc/puppet/etckeeper-commit-pre
 postrun_command=/etc/puppet/etckeeper-commit-post
 server = lou1
 certname = lou1
 [master]
 # These are needed when the puppetmaster is run by passenger
 # and can safely be removed if webrick is used.
 ssl_client_header = SSL_CLIENT_S_DN
 ssl_client_verify_header = SSL_CLIENT_VERIFY
 modulepath=/etc/puppet/modules
 storeconfigs=true
 dbadapter=postgresql
 dbuser=foreman
 dbpassword=foreman
 dbserver=localhost
 dbname=foreman
 reports=log, foreman
 certname=lou1
 server=lou1
 To:
 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/etc/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 templatedir=$confdir/prod/templates
 prerun_command=/etc/puppet/etckeeper-commit-pre
 postrun_command=/etc/puppet/etckeeper-commit-post
 server = lou1
 certname = lou1
 [master]
 # These are needed 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Deven Phillips

Adrien,

I did double check, and the directories do exist. I am running 
purely against production right now as I have yet to configure any of my 
agents to use a different environment.


Deven

On 10/11/2011 02:08 PM, Adrien Thebo wrote:

When I've run into this error, it was due to the environment
manifestdir/modulepath/templatedir not being set correctly or not
existing. Are you certain that those directories exist? What
environment is demonstrating this?

On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
deven.phill...@gmail.com  wrote:

Hello all,
 I have been searching through the list archives, but I have yet to find
an answer to my question. The problem I am having is this:
1. I have been using puppet without environments for some time now and it
works properly
2. I am trying to reconfigure to use environments, and I am getting errors
with plugins not getting sync'd.
The error I see on the agent node is:
err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
information from environment production source(s) puppet://lou1/plugins
notice: /File[/var/lib/puppet/lib/puppet]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider]: Skipping because of
failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
Dependency File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/type]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type]: Skipping because of failed
dependencies
notice: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Skipping because
of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Skipping
because of failed dependencies
notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Dependency
File[/var/lib/puppet/lib] has failures: true
warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Skipping
because of failed dependencies
On the puppet master, I changed my puppet.conf from:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server = lou1
certname = lou1
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
modulepath=/etc/puppet/modules
storeconfigs=true
dbadapter=postgresql
dbuser=foreman
dbpassword=foreman
dbserver=localhost
dbname=foreman
reports=log, foreman
certname=lou1
server=lou1
To:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/prod/templates

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Adrien Thebo
One thing I've noticed is that you've typo'd your templatedir for
production, it's $confidr. Are there any useful errors in the puppet
master logs? And just for a lark, could you run puppet agent -tv
--environment=production on one of your nodes?

On Tue, Oct 11, 2011 at 11:13 AM, Deven Phillips
deven.phill...@gmail.com wrote:
 Adrien,

    I did double check, and the directories do exist. I am running purely
 against production right now as I have yet to configure any of my agents to
 use a different environment.

 Deven

 On 10/11/2011 02:08 PM, Adrien Thebo wrote:

 When I've run into this error, it was due to the environment
 manifestdir/modulepath/templatedir not being set correctly or not
 existing. Are you certain that those directories exist? What
 environment is demonstrating this?

 On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
 deven.phill...@gmail.com  wrote:

 Hello all,
     I have been searching through the list archives, but I have yet to
 find
 an answer to my question. The problem I am having is this:
 1. I have been using puppet without environments for some time now and it
 works properly
 2. I am trying to reconfigure to use environments, and I am getting
 errors
 with plugins not getting sync'd.
 The error I see on the agent node is:
 err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
 information from environment production source(s) puppet://lou1/plugins
 notice: /File[/var/lib/puppet/lib/puppet]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of
 failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider]: Skipping because of
 failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
 Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
 Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
 Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]:
 Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]:
 Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
 Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type]: Skipping because of
 failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Skipping
 because
 of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Skipping
 because of failed dependencies
 On the puppet master, I changed my puppet.conf from:
 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/etc/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 templatedir=$confdir/templates
 prerun_command=/etc/puppet/etckeeper-commit-pre
 postrun_command=/etc/puppet/etckeeper-commit-post
 server = lou1
 certname = lou1
 [master]
 # These are needed when the puppetmaster is run by passenger
 # and can safely be removed if webrick is used.
 ssl_client_header = 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Craig White
Did you restart the 'service' (web server) ? If you make changes to the 
puppetmaster, you undoubtedly have to restart the service (webrick or mongrel) 
or apache/nginx (if passenger)

Craig

On Oct 11, 2011, at 11:13 AM, Deven Phillips wrote:

 Adrien,
 
I did double check, and the directories do exist. I am running purely 
 against production right now as I have yet to configure any of my agents to 
 use a different environment.
 
 Deven
 
 On 10/11/2011 02:08 PM, Adrien Thebo wrote:
 When I've run into this error, it was due to the environment
 manifestdir/modulepath/templatedir not being set correctly or not
 existing. Are you certain that those directories exist? What
 environment is demonstrating this?
 
 On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
 deven.phill...@gmail.com  wrote:
 Hello all,
 I have been searching through the list archives, but I have yet to find
 an answer to my question. The problem I am having is this:
 1. I have been using puppet without environments for some time now and it
 works properly
 2. I am trying to reconfigure to use environments, and I am getting errors
 with plugins not getting sync'd.
 The error I see on the agent node is:
 err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
 information from environment production source(s) puppet://lou1/plugins
 notice: /File[/var/lib/puppet/lib/puppet]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider]: Skipping because of
 failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/cvs.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/git.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/svn.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/hg.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]:
 Dependency File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo/bzr.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/vcsrepo.rb]: Skipping because
 of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/type/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/provider/vcsrepo.rb]: Skipping
 because of failed dependencies
 On the puppet master, I changed my puppet.conf from:
 [main]
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/etc/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 templatedir=$confdir/templates
 prerun_command=/etc/puppet/etckeeper-commit-pre
 postrun_command=/etc/puppet/etckeeper-commit-post
 server = lou1
 certname = lou1
 [master]
 # These are needed when the puppetmaster is run by passenger
 # and can safely be removed if webrick is used.
 ssl_client_header = SSL_CLIENT_S_DN
 ssl_client_verify_header = SSL_CLIENT_VERIFY
 modulepath=/etc/puppet/modules
 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Craig White

On Oct 11, 2011, at 10:30 AM, Deven Phillips wrote:

 Hello all,
 
 I have been searching through the list archives, but I have yet to find 
 an answer to my question. The problem I am having is this:
 
 1. I have been using puppet without environments for some time now and it 
 works properly
 2. I am trying to reconfigure to use environments, and I am getting errors 
 with plugins not getting sync'd.
 
 To:
 
 [main]
   logdir=/var/log/puppet
   vardir=/var/lib/puppet
   ssldir=/etc/puppet/ssl
   rundir=/var/run/puppet
   factpath=$vardir/lib/facter
   templatedir=$confdir/prod/templates
   prerun_command=/etc/puppet/etckeeper-commit-pre
   postrun_command=/etc/puppet/etckeeper-commit-post
   server = lou1
   certname = lou1
 
 [master]
   # These are needed when the puppetmaster is run by passenger
   # and can safely be removed if webrick is used.
   ssl_client_header = SSL_CLIENT_S_DN 
   ssl_client_verify_header = SSL_CLIENT_VERIFY
   modulepath=/etc/puppet/prod/modules
   storeconfigs=true
   dbadapter=postgresql
   dbuser=foreman
   dbpassword=foreman
   dbserver=localhost
   dbname=foreman
   reports=log, foreman
   certname=lou1
   server=lou1
 
 [production]
   manifest = $confdir/prod/manifests/site.pp
   manifestdir = $confdir/prod/manifests
   modulepath = $confdir/prod/modules
   templatedir = $confidr/prod/templates
 [staging]
   manifest = $confdir/staging/manifests/site.pp
   manifestdir = $confdir/staging/manifests
   modulepath = $confdir/staging/modules
   templatedir = $confidr/staging/templates
 [dev]
   manifest = $confdir/dev/manifests/site.pp
   manifestdir = $confdir/dev/manifests
   modulepath = $confdir/dev/modules
   templatedir = $confidr/dev/templates
 
 Puppet Master is running 2.7.3 and the agents are a mix of 2.6.x versions. 

I myself am suspicious of the $confdir variable since I never see it explicitly 
defined anywhere. You might want to explicitly define it but I don't think you 
want a modulepath defined in both [master] and in [production] but you might 
want a default environment defined in [master]

Craig

-- 
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] Issues switching over to using environments

2011-10-11 Thread Deven Phillips
Nope, that didn't seem to help the way I tried it... So, here's my layout:

/etc/puppet/
                 prod/
                        modules/
                                     files/
                                            generic_node/
                                                                etc/
                                                                      ssh/

      sshd_config

From a machine which is using production as it's environment, and
production points to prod/modules for it's modules; I still get
errors trying to get the sshd_config file.

TIA!!

Deven

On Tue, Oct 11, 2011 at 3:18 PM, Deven Phillips
deven.phill...@gmail.com wrote:

 Oh! IC... Let me try that...
 On Tue, Oct 11, 2011 at 3:15 PM, Aaron Grewell aaron.grew...@gmail.com 
 wrote:

 That'll be an error in your module's manifest or directory layout.   Files 
 are expected to reside in the 'files' directory inside the module.  What 
 does the manifest look like?

 On Oct 11, 2011 11:58 AM, Deven Phillips deven.phill...@gmail.com wrote:

 Aaron,

     I just ran across that in the docs myself... But I am still unable to 
 get files from modules... Here is the error I see on the agent node:

 err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not 
 evaluate: Could not retrieve information from environment production 
 source(s) puppet://lou1/modules/generic_node/etc/ssh/sshd_config at 
 /etc/puppet/prod/manifests/classes/ssh.pp:55

 And on the puppetmaster I see:

 lou1.example.com:8140 91.212.12.113 - - [11/Oct/2011:14:52:15 -0400] GET 
 /production/file_metadata/modules/generic_node/etc/ssh/sshd_config? 
 HTTP/1.1 404 2880 - -

 So, there is a disconnect somewhere and I don't have any idea why...

 Suggestions?

 Thanks,

 Deven

 On 10/11/2011 02:50 PM, Aaron Grewell wrote:

 There's no need.  The file server handles modules automagically.

 On Oct 11, 2011 11:40 AM, Deven Phillips deven.phill...@gmail.com wrote:

 OK, Licked that error as well. I had to add default values for the 
 manifests/manifestdir to the [master] section of the puppet.conf

 The next problem I am having is with fileserving... I moved all of my 
 files into modules directories for each environment, but I am not seeing 
 how to enable them in fileserver.conf. Any links to a good resource?

 Thanks,

 Deven

 On 10/11/2011 02:31 PM, Deven Phillips wrote:

 Thanks for the pointers all.. I fixed the mentioned typos and now I am 
 getting a different error. This one is a passenger error:



 Nothing in any of my configurations refers to /etc/puppet/manifests 
 anymore... I have grepped for that setting in all of the configs and in 
 the /usr/share/puppet/rack/puppetmasterd directory and I cannot find where 
 that is being referenced.

 Thanks,

 Deven

 On 10/11/2011 02:16 PM, Adrien Thebo wrote:

 One thing I've noticed is that you've typo'd your templatedir for
 production, it's $confidr. Are there any useful errors in the puppet
 master logs? And just for a lark, could you run puppet agent -tv
 --environment=production on one of your nodes?

 On Tue, Oct 11, 2011 at 11:13 AM, Deven Phillips
 deven.phill...@gmail.com wrote:

 Adrien,

    I did double check, and the directories do exist. I am running purely
 against production right now as I have yet to configure any of my agents to
 use a different environment.

 Deven

 On 10/11/2011 02:08 PM, Adrien Thebo wrote:

 When I've run into this error, it was due to the environment
 manifestdir/modulepath/templatedir not being set correctly or not
 existing. Are you certain that those directories exist? What
 environment is demonstrating this?

 On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
 deven.phill...@gmail.com  wrote:

 Hello all,
     I have been searching through the list archives, but I have yet to
 find
 an answer to my question. The problem I am having is this:
 1. I have been using puppet without environments for some time now and it
 works properly
 2. I am trying to reconfigure to use environments, and I am getting
 errors
 with plugins not getting sync'd.
 The error I see on the agent node is:
 err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
 information from environment production source(s) puppet://lou1/plugins
 notice: /File[/var/lib/puppet/lib/puppet]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test]: Skipping because of
 failed
 dependencies
 notice: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: /File[/var/lib/puppet/lib/puppet/test/iptables.rb]: Skipping
 because of failed dependencies
 notice: /File[/var/lib/puppet/lib/puppet/provider]: Dependency
 File[/var/lib/puppet/lib] has failures: true
 warning: 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Deven Phillips
The manifest which calls this looks like:

file {/etc/ssh/sshd_config:
owner   = root,
group   = root,
mode= 0644,
ensure  = present,
source  =
puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
require = Package['openssh'],
notify  = Service['ssh'],
}

And the current error on the agent node shows:

err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
evaluate: Could not retrieve information from environment production
source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
at /etc/puppet/prod/manifests/classes/ssh.pp:55


TIA,

Deven

On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
deven.phill...@gmail.com wrote:
 Nope, that didn't seem to help the way I tried it... So, here's my layout:

 /etc/puppet/
                  prod/
                         modules/
                                      files/
                                             generic_node/
                                                                 etc/
                                                                       ssh/

       sshd_config

 From a machine which is using production as it's environment, and
 production points to prod/modules for it's modules; I still get
 errors trying to get the sshd_config file.

 TIA!!

 Deven

 On Tue, Oct 11, 2011 at 3:18 PM, Deven Phillips
 deven.phill...@gmail.com wrote:

 Oh! IC... Let me try that...
 On Tue, Oct 11, 2011 at 3:15 PM, Aaron Grewell aaron.grew...@gmail.com 
 wrote:

 That'll be an error in your module's manifest or directory layout.   Files 
 are expected to reside in the 'files' directory inside the module.  What 
 does the manifest look like?

 On Oct 11, 2011 11:58 AM, Deven Phillips deven.phill...@gmail.com wrote:

 Aaron,

     I just ran across that in the docs myself... But I am still unable to 
 get files from modules... Here is the error I see on the agent node:

 err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not 
 evaluate: Could not retrieve information from environment production 
 source(s) puppet://lou1/modules/generic_node/etc/ssh/sshd_config at 
 /etc/puppet/prod/manifests/classes/ssh.pp:55

 And on the puppetmaster I see:

 lou1.example.com:8140 91.212.12.113 - - [11/Oct/2011:14:52:15 -0400] GET 
 /production/file_metadata/modules/generic_node/etc/ssh/sshd_config? 
 HTTP/1.1 404 2880 - -

 So, there is a disconnect somewhere and I don't have any idea why...

 Suggestions?

 Thanks,

 Deven

 On 10/11/2011 02:50 PM, Aaron Grewell wrote:

 There's no need.  The file server handles modules automagically.

 On Oct 11, 2011 11:40 AM, Deven Phillips deven.phill...@gmail.com 
 wrote:

 OK, Licked that error as well. I had to add default values for the 
 manifests/manifestdir to the [master] section of the puppet.conf

 The next problem I am having is with fileserving... I moved all of my 
 files into modules directories for each environment, but I am not 
 seeing how to enable them in fileserver.conf. Any links to a good 
 resource?

 Thanks,

 Deven

 On 10/11/2011 02:31 PM, Deven Phillips wrote:

 Thanks for the pointers all.. I fixed the mentioned typos and now I am 
 getting a different error. This one is a passenger error:



 Nothing in any of my configurations refers to /etc/puppet/manifests 
 anymore... I have grepped for that setting in all of the configs and in 
 the /usr/share/puppet/rack/puppetmasterd directory and I cannot find 
 where that is being referenced.

 Thanks,

 Deven

 On 10/11/2011 02:16 PM, Adrien Thebo wrote:

 One thing I've noticed is that you've typo'd your templatedir for
 production, it's $confidr. Are there any useful errors in the puppet
 master logs? And just for a lark, could you run puppet agent -tv
 --environment=production on one of your nodes?

 On Tue, Oct 11, 2011 at 11:13 AM, Deven Phillips
 deven.phill...@gmail.com wrote:

 Adrien,

    I did double check, and the directories do exist. I am running purely
 against production right now as I have yet to configure any of my agents 
 to
 use a different environment.

 Deven

 On 10/11/2011 02:08 PM, Adrien Thebo wrote:

 When I've run into this error, it was due to the environment
 manifestdir/modulepath/templatedir not being set correctly or not
 existing. Are you certain that those directories exist? What
 environment is demonstrating this?

 On Tue, Oct 11, 2011 at 10:30 AM, Deven Phillips
 deven.phill...@gmail.com  wrote:

 Hello all,
     I have been searching through the list archives, but I have yet to
 find
 an answer to my question. The problem I am having is this:
 1. I have been using puppet without environments for some time now and it
 works properly
 2. I am trying to reconfigure to use environments, and I am getting
 errors
 with plugins not getting sync'd.
 The error I see on the agent node is:
 err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not 

Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Jacob Helwig
The layout should look something more like this:
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config

With the source lines looking like:
  puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config


If you wanted 'generic_node' to be the name of the module, then you'd
have the layout as

  /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config

and the source line as

  puppet://lou1/modules/generic_node/etc/ssh/sshd_config

-- 
Jacob Helwig

On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
 Date: Tue, 11 Oct 2011 15:26:16 -0400
 From: Deven Phillips deven.phill...@gmail.com
 To: puppet-users@googlegroups.com
 Subject: Re: [Puppet Users] Issues switching over to using environments
 Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com
 
 The manifest which calls this looks like:
 
 file {/etc/ssh/sshd_config:
 owner   = root,
 group   = root,
 mode= 0644,
 ensure  = present,
 source  =
 puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
 require = Package['openssh'],
 notify  = Service['ssh'],
 }
 
 And the current error on the agent node shows:
 
 err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
 evaluate: Could not retrieve information from environment production
 source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
 at /etc/puppet/prod/manifests/classes/ssh.pp:55
 
 
 TIA,
 
 Deven
 
 On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Nope, that didn't seem to help the way I tried it... So, here's my layout:
 
  /etc/puppet/
                   prod/
                          modules/
                                       files/
                                              generic_node/
                                                                  etc/
                                                                        ssh/
 
        sshd_config
 
  From a machine which is using production as it's environment, and
  production points to prod/modules for it's modules; I still get
  errors trying to get the sshd_config file.
 
  TIA!!
 
  Deven
 


signature.asc
Description: Digital signature


Re: [Puppet Users] Issues switching over to using environments

2011-10-11 Thread Deven Phillips
Trying that out now.. I will respond back in a bit with results.

Thanks!!!

Deven

On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 The layout should look something more like this:
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config

 With the source lines looking like:
  puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config


 If you wanted 'generic_node' to be the name of the module, then you'd
 have the layout as

  /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config

 and the source line as

  puppet://lou1/modules/generic_node/etc/ssh/sshd_config

 --
 Jacob Helwig

 On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
 Date: Tue, 11 Oct 2011 15:26:16 -0400
 From: Deven Phillips deven.phill...@gmail.com
 To: puppet-users@googlegroups.com
 Subject: Re: [Puppet Users] Issues switching over to using environments
 Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com

 The manifest which calls this looks like:

         file {/etc/ssh/sshd_config:
                 owner   = root,
                 group   = root,
                 mode    = 0644,
                 ensure  = present,
                 source  =
 puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
                 require = Package['openssh'],
                 notify  = Service['ssh'],
         }

 And the current error on the agent node shows:

 err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
 evaluate: Could not retrieve information from environment production
 source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
 at /etc/puppet/prod/manifests/classes/ssh.pp:55


 TIA,

 Deven

 On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Nope, that didn't seem to help the way I tried it... So, here's my layout:
 
  /etc/puppet/
                   prod/
                          modules/
                                       files/
                                              generic_node/
                                                                  etc/
                                                                        ssh/
 
        sshd_config
 
  From a machine which is using production as it's environment, and
  production points to prod/modules for it's modules; I still get
  errors trying to get the sshd_config file.
 
  TIA!!
 
  Deven
 


-- 
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] Issues switching over to using environments

2011-10-11 Thread Deven Phillips
Jacob,

That was the problem!! Thanks so much for the help. And Aaron and
everyone else as well. Much appreciated!!

Deven

On Tue, Oct 11, 2011 at 3:56 PM, Deven Phillips
deven.phill...@gmail.com wrote:
 Trying that out now.. I will respond back in a bit with results.

 Thanks!!!

 Deven

 On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 The layout should look something more like this:
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config

 With the source lines looking like:
  puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config


 If you wanted 'generic_node' to be the name of the module, then you'd
 have the layout as

  /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config

 and the source line as

  puppet://lou1/modules/generic_node/etc/ssh/sshd_config

 --
 Jacob Helwig

 On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
 Date: Tue, 11 Oct 2011 15:26:16 -0400
 From: Deven Phillips deven.phill...@gmail.com
 To: puppet-users@googlegroups.com
 Subject: Re: [Puppet Users] Issues switching over to using environments
 Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com

 The manifest which calls this looks like:

         file {/etc/ssh/sshd_config:
                 owner   = root,
                 group   = root,
                 mode    = 0644,
                 ensure  = present,
                 source  =
 puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
                 require = Package['openssh'],
                 notify  = Service['ssh'],
         }

 And the current error on the agent node shows:

 err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
 evaluate: Could not retrieve information from environment production
 source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
 at /etc/puppet/prod/manifests/classes/ssh.pp:55


 TIA,

 Deven

 On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Nope, that didn't seem to help the way I tried it... So, here's my layout:
 
  /etc/puppet/
                   prod/
                          modules/
                                       files/
                                              generic_node/
                                                                  etc/
                                                                        ssh/
 
        sshd_config
 
  From a machine which is using production as it's environment, and
  production points to prod/modules for it's modules; I still get
  errors trying to get the sshd_config file.
 
  TIA!!
 
  Deven
 



-- 
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] Issues switching over to using environments

2011-10-11 Thread Gonzalo Servat
Somewhat related to this, is there a way for Puppet to source files in this
manner:

First: /etc/puppet/modules/module/$environment/file
Default: /etc/puppet/modules/module/file

Just to avoid having the same directory structure under
/etc/puppet/$environment/ as Deven has done.

Best regards,
Gonzalo

On Wed, Oct 12, 2011 at 8:26 AM, Deven Phillips deven.phill...@gmail.comwrote:

 Jacob,

That was the problem!! Thanks so much for the help. And Aaron and
 everyone else as well. Much appreciated!!

 Deven

 On Tue, Oct 11, 2011 at 3:56 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Trying that out now.. I will respond back in a bit with results.
 
  Thanks!!!
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com
 wrote:
  The layout should look something more like this:
 
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config
 
  With the source lines looking like:
   puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config
 
 
  If you wanted 'generic_node' to be the name of the module, then you'd
  have the layout as
 
   /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config
 
  and the source line as
 
   puppet://lou1/modules/generic_node/etc/ssh/sshd_config
 
  --
  Jacob Helwig
 
  On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
  Date: Tue, 11 Oct 2011 15:26:16 -0400
  From: Deven Phillips deven.phill...@gmail.com
  To: puppet-users@googlegroups.com
  Subject: Re: [Puppet Users] Issues switching over to using environments
  Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com
 
  The manifest which calls this looks like:
 
  file {/etc/ssh/sshd_config:
  owner   = root,
  group   = root,
  mode= 0644,
  ensure  = present,
  source  =
  puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
  require = Package['openssh'],
  notify  = Service['ssh'],
  }
 
  And the current error on the agent node shows:
 
  err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
  evaluate: Could not retrieve information from environment production
  source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
  at /etc/puppet/prod/manifests/classes/ssh.pp:55
 
 
  TIA,
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
  deven.phill...@gmail.com wrote:
   Nope, that didn't seem to help the way I tried it... So, here's my
 layout:
  
   /etc/puppet/
prod/
   modules/
files/
   generic_node/
   etc/
  
 ssh/
  
 sshd_config
  
   From a machine which is using production as it's environment, and
   production points to prod/modules for it's modules; I still get
   errors trying to get the sshd_config file.
  
   TIA!!
  
   Deven
  
 
 

 --
 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] Issues switching over to using environments

2011-10-11 Thread Dan White
http://docs.puppetlabs.com/references/stable/type.html#file

under source
If you specify multiple file sources for a file, then the first source that 
exists will be used. This allows you to specify what amount to search paths for 
files:

  file { /path/to/my/file:
source = [
  /modules/nfs/files/file.$host,
  /modules/nfs/files/file.$operatingsystem,
  /modules/nfs/files/file
]
  }
This will use the first found file as the source.


On Oct 11, 2011, at 5:43 PM, Gonzalo Servat wrote:

 Somewhat related to this, is there a way for Puppet to source files in this 
 manner:
 
 First: /etc/puppet/modules/module/$environment/file
 Default: /etc/puppet/modules/module/file
 
 Just to avoid having the same directory structure under 
 /etc/puppet/$environment/ as Deven has done.
 
 Best regards,
 Gonzalo
 
 On Wed, Oct 12, 2011 at 8:26 AM, Deven Phillips deven.phill...@gmail.com 
 wrote:
 Jacob,
 
That was the problem!! Thanks so much for the help. And Aaron and
 everyone else as well. Much appreciated!!
 
 Deven
 
 On Tue, Oct 11, 2011 at 3:56 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Trying that out now.. I will respond back in a bit with results.
 
  Thanks!!!
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com wrote:
  The layout should look something more like this:
   
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config
 
  With the source lines looking like:
   puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config
 
 
  If you wanted 'generic_node' to be the name of the module, then you'd
  have the layout as
 
   /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config
 
  and the source line as
 
   puppet://lou1/modules/generic_node/etc/ssh/sshd_config
 
  --
  Jacob Helwig
 
  On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
  Date: Tue, 11 Oct 2011 15:26:16 -0400
  From: Deven Phillips deven.phill...@gmail.com
  To: puppet-users@googlegroups.com
  Subject: Re: [Puppet Users] Issues switching over to using environments
  Message-ID: 
  cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com
 
  The manifest which calls this looks like:
 
  file {/etc/ssh/sshd_config:
  owner   = root,
  group   = root,
  mode= 0644,
  ensure  = present,
  source  =
  puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
  require = Package['openssh'],
  notify  = Service['ssh'],
  }
 
  And the current error on the agent node shows:
 
  err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
  evaluate: Could not retrieve information from environment production
  source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
  at /etc/puppet/prod/manifests/classes/ssh.pp:55
 
 
  TIA,
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
  deven.phill...@gmail.com wrote:
   Nope, that didn't seem to help the way I tried it... So, here's my 
   layout:
  
   /etc/puppet/
prod/
   modules/
files/
   generic_node/
   etc/
 
   ssh/
  
 sshd_config
  
   From a machine which is using production as it's environment, and
   production points to prod/modules for it's modules; I still get
   errors trying to get the sshd_config file.
  
   TIA!!
  
   Deven
  
 
 
 
 --
 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.

-- 
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] Issues switching over to using environments

2011-10-11 Thread Gonzalo Servat
Thanks Dan. I thought Puppet may have a way to automagically search for a
file based on environment first (e.g. modules/nfs/$environment/foo), then a
default as specified by source (e.g. modules/nfs/foo). I can see how what
you pasted helps, but it could become tedious having to specify the search
path in various places.

On Wed, Oct 12, 2011 at 12:14 PM, Dan White y...@comcast.net wrote:

 http://docs.puppetlabs.com/references/stable/type.html#file

 under source

 If you specify multiple file sources for a file, then the first source that
 exists will be used. This allows you to specify what amount to search paths
 for files:

   file { /path/to/my/file:
 source = [
   /modules/nfs/files/file.$host,
   /modules/nfs/files/file.$operatingsystem,
   /modules/nfs/files/file
 ]
   }

 This will use the first found file as the source.

 On Oct 11, 2011, at 5:43 PM, Gonzalo Servat wrote:

 Somewhat related to this, is there a way for Puppet to source files in this
 manner:

 First: /etc/puppet/modules/module/$environment/file
 Default: /etc/puppet/modules/module/file

 Just to avoid having the same directory structure under
 /etc/puppet/$environment/ as Deven has done.

 Best regards,
 Gonzalo

 On Wed, Oct 12, 2011 at 8:26 AM, Deven Phillips 
 deven.phill...@gmail.comwrote:

 Jacob,

That was the problem!! Thanks so much for the help. And Aaron and
 everyone else as well. Much appreciated!!

 Deven

 On Tue, Oct 11, 2011 at 3:56 PM, Deven Phillips
 deven.phill...@gmail.com wrote:
  Trying that out now.. I will respond back in a bit with results.
 
  Thanks!!!
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:42 PM, Jacob Helwig ja...@puppetlabs.com
 wrote:
  The layout should look something more like this:
 
  /etc/puppet/prod/modules/$module_name/files/generic_node/etc/ssh/sshd_config
 
  With the source lines looking like:
   puppet://lou1/modules/$module_name/generic_node/etc/ssh/sshd_config
 
 
  If you wanted 'generic_node' to be the name of the module, then you'd
  have the layout as
 
   /etc/puppet/prod/modules/generic_node/files/etc/ssh/sshd_config
 
  and the source line as
 
   puppet://lou1/modules/generic_node/etc/ssh/sshd_config
 
  --
  Jacob Helwig
 
  On Tue, 11 Oct 2011 15:26:16 -0400, Deven Phillips wrote:
  Date: Tue, 11 Oct 2011 15:26:16 -0400
  From: Deven Phillips deven.phill...@gmail.com
  To: puppet-users@googlegroups.com
  Subject: Re: [Puppet Users] Issues switching over to using
 environments
  Message-ID: 
 cajw+4nd2kwpgc5-mre1k23of_ym9equbaa+09xmukzkou-o...@mail.gmail.com
 
  The manifest which calls this looks like:
 
  file {/etc/ssh/sshd_config:
  owner   = root,
  group   = root,
  mode= 0644,
  ensure  = present,
  source  =
  puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config,
  require = Package['openssh'],
  notify  = Service['ssh'],
  }
 
  And the current error on the agent node shows:
 
  err: /Stage[main]/Secureshell/File[/etc/ssh/sshd_config]: Could not
  evaluate: Could not retrieve information from environment production
  source(s) puppet://lou1/modules/files/generic_node/etc/ssh/sshd_config
  at /etc/puppet/prod/manifests/classes/ssh.pp:55
 
 
  TIA,
 
  Deven
 
  On Tue, Oct 11, 2011 at 3:23 PM, Deven Phillips
  deven.phill...@gmail.com wrote:
   Nope, that didn't seem to help the way I tried it... So, here's my
 layout:
  
   /etc/puppet/
prod/
   modules/
files/
   generic_node/
   etc/
  
   ssh/
  
 sshd_config
  
   From a machine which is using production as it's environment, and
   production points to prod/modules for it's modules; I still get
   errors trying to get the sshd_config file.
  
   TIA!!
  
   Deven
  
 
 

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


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