Add command_prefix field to puppet mcagent
This will allow to run puppet with environment variables. E.g. FACTER_foo=bar puppet apply ... Change-Id: I1e435262e810ead46689078513607f6a99a19043 Implements: blueprint get-rid-cobbler-dnsmasq
This commit is contained in:
parent
3c0bc71a87
commit
c734b03042
|
@ -97,6 +97,14 @@ action "runonce", :description => "Invoke a single puppet run" do
|
||||||
:default => true,
|
:default => true,
|
||||||
:optional => true
|
:optional => true
|
||||||
|
|
||||||
|
input :command_prefix,
|
||||||
|
:prompt => "Puppet command prefix (allows to run puppet with variables)",
|
||||||
|
:description => "Allows to run puppet with variables (e.g. FACTER_foo=bar)",
|
||||||
|
:type => :string,
|
||||||
|
:validation => :shellsafe,
|
||||||
|
:default => '',
|
||||||
|
:optional => true
|
||||||
|
|
||||||
output :output,
|
output :output,
|
||||||
:description => "Output from puppet",
|
:description => "Output from puppet",
|
||||||
:display_as => "Output"
|
:display_as => "Output"
|
||||||
|
|
|
@ -202,7 +202,9 @@ module MCollective
|
||||||
cwd = request.fetch(:cwd, '/')
|
cwd = request.fetch(:cwd, '/')
|
||||||
manifest = request.fetch(:manifest, '/etc/puppet/manifests/site.pp')
|
manifest = request.fetch(:manifest, '/etc/puppet/manifests/site.pp')
|
||||||
module_path = request.fetch(:modules, '/etc/puppet/modules')
|
module_path = request.fetch(:modules, '/etc/puppet/modules')
|
||||||
|
command_prefix = request.fetch(:command_prefix, '')
|
||||||
cmd = [
|
cmd = [
|
||||||
|
command_prefix,
|
||||||
@puppetd,
|
@puppetd,
|
||||||
"-c #{cwd}",
|
"-c #{cwd}",
|
||||||
@puppetd_agent,
|
@puppetd_agent,
|
||||||
|
|
Loading…
Reference in New Issue