Set locate to en_US.UTF-8 before calling puppet

When puppet is run from scripts or environments without tty it's required to
set locale as it can be empty or LC_ALL=c, though many puppet manifests
have Unicode characters.

Change-Id: I824b3212b0c258650c457dfe5e2fb5cc9f6a5a4b
blueprint: support-ubuntu-trusty
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
This commit is contained in:
Sergii Golovatiuk 2015-02-05 14:01:47 +01:00
parent cf25925680
commit 7e6e6f9188
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ module MCollective
cmd = cmd.join(" ")
output = reply[:output] || ''
run(cmd, :stdout => :output, :chomp => true, :cwd => cwd)
run(cmd, :stdout => :output, :chomp => true, :cwd => cwd, :environment => { 'LC_ALL' => 'en_US.UTF-8' })
reply[:output] = "Called #{cmd}, " + output + (reply[:output] || '')
end