Not able to add new environment on puppet server
Hi, I am using PE 4.2.2 with a single agent node. The default environment on puppet master is ''production". I added a new environment "development" by just adding a directory containing moudles, manifest and a conf file at /etc/puppetlabs/code/environments
The agent node is already configured with Porduction env which I changed and set to development in puppet.conf but it's not able to find the newly added environment.
Please find the configurations below:
SERVER: [main] certname = myhost server = myhost user = pe-puppet group = pe-puppet archive_files = true archive_file_server = myhost module_groups = base+pe_only environmentpath = /etc/puppetlabs/code/environments [agent] graph = true [master] node_terminus = classifier storeconfigs = true storeconfigs_backend = puppetdb reports = puppetdb certname = myhost always_cache_features = true autosign = true [root@ip-10-121-48-69 environments]# ---- AGENT: [root@pupnode ~]# cat /etc/puppetlabs/puppet/puppet.conf server = puppet environment = development [root@pupnode ~]#
Getting following error on agent node:
[root@pupnode ~]# puppet config print | grep -i modulepath modulepath = /etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules [root@pupnode ~]# puppet config set environment development --section main [root@pupnode ~]# puppet config print | grep -i modulepath /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'development' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound)