Add basemodulepath to the Puppet mcagent

This parameter is required for Puppet 4
to be able to find the base modules without
any environment defined.

Puppet 3 is able to work in the legacy mode
without the environment support and does not
case if there is base module path or not.

Closes-Bug: 1655663
Change-Id: I60f2c78ef5fe366314eea186f4671d198e54f1d6
This commit is contained in:
Dmitry Ilyin 2017-01-11 17:24:09 +03:00
parent 2505ab1d8e
commit 1c1578b64a
1 changed files with 5 additions and 2 deletions

View File

@ -200,12 +200,15 @@ module MCollective
rm_file(@last_report)
rm_file(@last_summary)
cwd = request.fetch(:cwd, '/')
manifest = request.fetch(:manifest, '/etc/puppet/manifests/site.pp')
module_path = request.fetch(:modules, '/etc/puppet/modules')
cmd = [
@puppetd,
"-c #{cwd}",
@puppetd_agent,
request.fetch(:manifest, '/etc/puppet/manifests/site.pp'),
"--modulepath=#{request.fetch(:modules, '/etc/puppet/modules')}",
manifest,
'--modulepath', module_path,
'--basemodulepath', module_path,
'--logdest', 'syslog',
'--trace',
'--reports', 'none',