Question on directory environments and environment.conf - Puppet Version 3.6.2

547 views
Skip to first unread message

Peter

unread,
Jun 13, 2014, 8:48:56 PM6/13/14
to puppet...@googlegroups.com
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

Peter

unread,
Jun 19, 2014, 9:29:44 AM6/19/14
to puppet...@googlegroups.com
Hi List,

Does anyone have any suggestions on this?  I was hoping that someone may have gotten it working or at least agree that there is an issue.  I am happy to raise a puppet ticket.

Peter.

Denmat

unread,
Jun 19, 2014, 5:28:16 PM6/19/14
to puppet...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2cba773a-b227-4eb0-bbd5-31c8a73f24ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter

unread,
Jun 20, 2014, 6:59:20 AM6/20/14
to puppet...@googlegroups.com
Hi Denmat,

Thanks I should have read the web page a bit closer.

Peter.
Reply all
Reply to author
Forward
0 new messages