I'm trying to use environments and seem to be failing. Right now I have 4 defined environments: production, cat, development, beta
They are defined as follows on my puppetmaster: cat /etc/puppet/puppet.conf [main] pluginsync = true vardir = /var/lib/puppet manifest = /etc/puppet/environments/production/site.pp modulepath = /etc/puppet/environments/production/modules [master] reports = foreman ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY logdir = /var/lib/puppet/log external_nodes = /etc/puppet/external_node.rb node_terminus = exec [agent] environment = production report = true [cat] manifest = /etc/puppet/environments/cat/site.pp modulepath = /etc/puppet/environments/cat/modules [development] manifest = /etc/puppet/environments/development/site.pp modulepath = /etc/puppet/environments/development/modules [beta] manifest = /etc/puppet/environments/beta/site.pp modulepath = /etc/puppet/environments/beta/modules I am trying to run the puppet agent on another system that references this master. Its setup to use the beta environment. The problem is the catalog and templates seem to come from the production environment, while files are coming from the beta environment. I've tested this by putting comments in a template with 'beta' for the template in the beta env and 'prod' for the template in the production env. I did the same thing with a static file. I also put a notify in a manifest stating 'prod' or 'beta' with: for beta: notify{"This manifest is from beta. My env is ${environment}": } for production: notify{"This manifest is from prod. My env is ${environment}": } So from the system when setup as beta you'll see the template and catalog reference prod while the file references beta: puppet agent --test --noop --environment=beta info: Retrieving plugin info: Loading facts in hcs_service info: Loading facts in os_version info: Loading facts in memorysize info: Loading facts in uspspuppetfacts info: Loading facts in network info: Loading facts in buildinfo info: Loading facts in hcs_service info: Loading facts in os_version info: Loading facts in memorysize info: Loading facts in uspspuppetfacts info: Loading facts in network info: Loading facts in buildinfo pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. info: Caching catalog for info: Applying configuration version '1306952659' notice: /Stage[main]/Common/Service[cron]/ensure: current_value stopped, should be running (noop) notice: /Stage[main]/Common/Notify[This manifest is from prod. My env is beta]/message: current_value absent, should be This manifest is from prod. My env is beta (noop) --- /etc/syslog-ng/syslog-ng.conf 2011-06-01 12:16:17.000000000 -0500 +++ /tmp/puppet-file20110601-30205-es1qks-0 2011-06-01 13:27:44.151951897 -0500 @@ -245,3 +245,4 @@ destination scsp_dest { pipe("/opt/Symantec/scspagent/IDS/system/ ids_syslog.pipe" group(sisips) perm(0600)); }; filter scsp_filter { level(debug..emerg) and not ( facility(mail) and level(debug..warn) ); }; log { source(src); filter(scsp_filter); destination(scsp_dest); }; +# prod notice: /Stage[main]/Common::Syslog/File[syslog.conf]/content: current_value {md5}383b7458610f1041afae202b16449eb7, should be {md5} 60eaeb99f1d937d2ab1f784a25ff695f (noop) info: /Stage[main]/Common::Syslog/File[syslog.conf]: Scheduling refresh of Service[syslog] notice: /Stage[main]/Common::Syslog/Service[syslog]/ensure: current_value stopped, should be running (noop) notice: /Stage[main]/Common::Syslog/Service[syslog]: Would have triggered 'refresh' from 1 events --- /etc/audit/audit.rules 2011-05-27 08:29:07.000000000 -0500 +++ /tmp/puppet-file20110601-30205-h9qyn0-0 2011-06-01 13:27:44.471940710 -0500 @@ -12,4 +12,5 @@ # Feel free to add below this line. See auditctl man page --w /etc/syslog-ng/syslog-ng.conf \ No newline at end of file +-w /etc/syslog-ng/syslog-ng.conf +# beta notice: /Stage[main]/Common::Auditd/File[audit.rules]/content: current_value {md5}6a01ac645e8aed5a4f0f5c165815dc78, should be {md5} 197364e2ca6f10b9ec4d73168eabe7c6 (noop) info: /Stage[main]/Common::Auditd/File[audit.rules]: Scheduling refresh of Service[auditd] notice: /Stage[main]/Common::Auditd/Service[auditd]: Would have triggered 'refresh' from 1 events notice: Finished catalog run in 3.10 seconds And from production everything references prod: puppet agent --test --noop --environment=production info: Retrieving plugin info: Loading facts in hcs_service info: Loading facts in os_version info: Loading facts in memorysize info: Loading facts in uspspuppetfacts info: Loading facts in network info: Loading facts in buildinfo info: Loading facts in hcs_service info: Loading facts in os_version info: Loading facts in memorysize info: Loading facts in uspspuppetfacts info: Loading facts in network info: Loading facts in buildinfo pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. info: Caching catalog for info: Applying configuration version '1306952659' --- /etc/audit/audit.rules 2011-05-27 08:29:07.000000000 -0500 +++ /tmp/puppet-file20110601-30734-1iy3lbj-0 2011-06-01 13:28:05.781967095 -0500 @@ -12,4 +12,5 @@ # Feel free to add below this line. See auditctl man page --w /etc/syslog-ng/syslog-ng.conf \ No newline at end of file +-w /etc/syslog-ng/syslog-ng.conf +# prod notice: /Stage[main]/Common::Auditd/File[audit.rules]/content: current_value {md5}6a01ac645e8aed5a4f0f5c165815dc78, should be {md5} 59f1c8f051aff8f87bfb5d78924fd4ac (noop) info: /Stage[main]/Common::Auditd/File[audit.rules]: Scheduling refresh of Service[auditd] notice: /Stage[main]/Common::Auditd/Service[auditd]: Would have triggered 'refresh' from 1 events --- /etc/syslog-ng/syslog-ng.conf 2011-06-01 12:16:17.000000000 -0500 +++ /tmp/puppet-file20110601-30734-f2hdy9-0 2011-06-01 13:28:06.462063975 -0500 @@ -245,3 +245,4 @@ destination scsp_dest { pipe("/opt/Symantec/scspagent/IDS/system/ ids_syslog.pipe" group(sisips) perm(0600)); }; filter scsp_filter { level(debug..emerg) and not ( facility(mail) and level(debug..warn) ); }; log { source(src); filter(scsp_filter); destination(scsp_dest); }; +# prod notice: /Stage[main]/Common::Syslog/File[syslog.conf]/content: current_value {md5}383b7458610f1041afae202b16449eb7, should be {md5} 60eaeb99f1d937d2ab1f784a25ff695f (noop) info: /Stage[main]/Common::Syslog/File[syslog.conf]: Scheduling refresh of Service[syslog] notice: /Stage[main]/Common::Syslog/Service[syslog]/ensure: current_value stopped, should be running (noop) notice: /Stage[main]/Common::Syslog/Service[syslog]: Would have triggered 'refresh' from 1 events notice: /Stage[main]/Common/Service[cron]/ensure: current_value stopped, should be running (noop) notice: /Stage[main]/Common/Notify[This manifest is from prod. My env is production]/message: current_value absent, should be This manifest is from prod. My env is production (noop) notice: Finished catalog run in 2.88 seconds Hopefully whatever I'm doing wrong is a simple fix. Thanks, Jake -- 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.