$ cat /etc/puppet/puppet.conf
[main]
environmentpath = $confdir/environments
basemodulepath = $confdir/environments/$environment/dist
$ sudo puppet config print modulepath --environment datanode
/etc/puppet/environments/datanode/modules:/etc/puppet/environments/datanode/dist
$ ls ~/puppet
Puppetfile README.md dist manifests
$ ls /etc/puppet
auth.conf autosign.conf environments manifests
puppetdb.conf routes.yaml
auth.conf.dpkg-dist config.ru hiera.yaml puppet.conf r10k
unicorn.conf
$ ls /etc/puppet/environments/production
dist manifests modules Puppetfile README.md
dist contain modules in ~/puppet, modules contain modules specified by
Puppetfile
Now the problem is that puppet always applies modules in
/etc/puppet/environments/production/dist, even the environment is not.
In data01
$ sudo puppet agent --environment datanode -t
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Evaluation Error: Error while evaluating a Function Call, Could not find
class package::data for data01 at
/etc/puppet/environments/datanode/manifests/data.pp:9:3 on node data01
But it is there.
$cat /etc/puppet/environments/datanode/dist/package/manifests/data.pp
class package::data {
...
}
when I run puppet master in debug mode , I find it applies all modules in
/etc/puppet/environments/production/dist, like following:
Debug: importing
'/etc/puppet/environments/production/dist/supervisor/manifests/params.pp'
in environment datanode
Debug: Automatically imported supervisor::params from supervisor/params
into datanode
Debug: importing
'/etc/puppet/environments/production/dist/nrpe/manifests/checker/supervisor.pp'
in environment datanode
Debug: Automatically imported nrpe::checker::supervisor from
nrpe/checker/supervisor into datanode
Debug: importing
'/etc/puppet/environments/production/dist/nrpe/manifests/checker/cfb.pp' in
environment datanode
So I am completely confused.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/418dfb5e-66e5-4673-9ac6-caecec0ed7e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.