I have file structures for 2 environments on my puppet master server. Running
ls /etc/puppetlabs/code/environments/ on my master server returns two folders
Yet when I go on my agent and run
puppet apply -t --environment beta I get the error:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'beta' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound)
On the master server I can successfully apply the beta manifest with
puppet apply /etc/puppetlabs/code/environments/beta/manifests/site.pp.
I'm trying to figure out why Puppet isn't detecting the folder. How can I go about debugging this?
I also tried
puppet agent -t --environment beta, as suggested by @gd_, which returns:
Notice: Local environment: 'beta' doesn't match server specified node environment 'production', switching agent to 'production'.
/etc/puppetlabs/puppet/puppet.conf (on agent) is as follows:
# This file can be used to override the default puppet settings. # See the following links for more details on what settings are available: # - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html # - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html # - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html # - https://docs.puppetlabs.com/puppet/latest/reference/configuration.html
Using open source version.