Hi List,
I am starting to play with directory environments on a test box. I am using puppet apply (without a master) to get a feel for how it all comes together.
Key files:
puppet.conf
---------------------------------------------------------------------------------------------------------------------------------------------------------
10:35 - root@dna: bootstrap/puppet
$ cat /root/tmp/bootstrap/puppet/puppet.conf
[main]
#Turn on the new smarter directory envrionments
envrionmentpath= $confdir/environments
#Need to set this here for playing with repo as environment.conf does not allow setting hiera.yaml location
hiera_config= $confdir/$environment/hiera.yaml
---------------------------------------------------------------------------------------------------------------------------------------------------------
environment.conf
---------------------------------------------------------------------------------------------------------------------------------------------------------
10:35 - root@dna: bootstrap/puppet
$ cat /root/tmp/bootstrap/puppet/environments/production/environment.conf
#Use relative paths within environment directory
modulepath = site-modules:modules
---------------------------------------------------------------------------------------------------------------------------------------------------------
puppet config print does not show show the modulepath with the environment.conf details
---------------------------------------------------------------------------------------------------------------------------------------------------------
10:38 - root@dna: tmp/bootstrap
$ puppet config print --confdir /root/tmp/bootstrap/puppet --environment production | grep modulepath
basemodulepath = /root/tmp/bootstrap/puppet/modules:/usr/share/puppet/modules
modulepath = /root/tmp/bootstrap/puppet/modules:/usr/share/puppet/modules
---------------------------------------------------------------------------------------------------------------------------------------------------------
I have also tried to use puppet apply in case it was an issue with puppet config:
---------------------------------------------------------------------------------------------------------------------------------------------------------
10:38 - root@dna: tmp/bootstrap
$ FACTER_hostname=dna FACTER_domain=mgnt.local FACTER_fqdn=dna.mgnt.local FACTER_machine_role=puppetmaster puppet apply --verbose --confdir /root/tmp/bootstrap/puppet -e "include roles::puppetmaster" --debug
Error: Could not find class roles::puppetmaster for dna.mgnt.local on node dna.mgnt.local
Error: Could not find class roles::puppetmaster for dna.mgnt.local on node dna.mgnt.local
---------------------------------------------------------------------------------------------------------------------------------------------------------
site-modules does contain the puppetmaster file in the correct location
---------------------------------------------------------------------------------------------------------------------------------------------------------
10:40 - root@dna: bootstrap/puppet
$ ls /root/tmp/bootstrap/puppet/environments/production/site-modules/roles/manifests/
puppetmaster.pp
---------------------------------------------------------------------------------------------------------------------------------------------------------
My question is why isn't the environment.conf file being picked up? Is this something that will only work if I am running a puppetmaster?
Have I missed something obvious?
Thanks,
Peter