summaryrefslogtreecommitdiff
path: root/bin/puppet_command
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2016-11-04 10:54:28 -0400
committerMicah Anderson <micah@riseup.net>2016-11-04 10:54:28 -0400
commit34a381efa8f6295080c843f86bfa07d4e41056af (patch)
tree9282cf5d4c876688602705a7fa0002bc4a810bde /bin/puppet_command
parent0a72bc6fd292bf9367b314fcb0347c4d35042f16 (diff)
parent5821964ff7e16ca7aa9141bd09a77d355db492a9 (diff)
Merge branch 'develop'
Diffstat (limited to 'bin/puppet_command')
-rwxr-xr-xbin/puppet_command10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/puppet_command b/bin/puppet_command
index eb3cd0b9..a2876fd9 100755
--- a/bin/puppet_command
+++ b/bin/puppet_command
@@ -28,7 +28,7 @@ SUMMARY_LOG = '/var/log/leap/deploy-summary.log'
SUMMARY_LOG_1 = '/var/log/leap/deploy-summary.log.1'
APPLY_START_STR = "STARTING APPLY"
APPLY_FINISH_STR = "APPLY COMPLETE"
-
+LANG = "en_US.UTF-8"
def main
if File.read('/etc/debian_version') !~ DEBIAN_VERSION
@@ -144,7 +144,7 @@ def puppet_apply(options={}, &block)
fqdn = hiera_file['domain']['full']
domain = hiera_file['domain']['full_suffix']
Dir.chdir(PUPPET_DIRECTORY) do
- return run("FACTER_fqdn='#{fqdn}' FACTER_domain='#{domain}' #{PUPPET_BIN} apply #{custom_parameters(options)} --modulepath='#{modulepath}' #{PUPPET_PARAMETERS} #{manifest}", &block)
+ return run("LANG='#{LANG}' FACTER_fqdn='#{fqdn}' FACTER_domain='#{domain}' #{PUPPET_BIN} apply #{custom_parameters(options)} --modulepath='#{modulepath}' #{PUPPET_PARAMETERS} #{manifest}", &block)
end
end
@@ -173,9 +173,9 @@ def platform_version_check!
return unless @info["platform"]
new_version = @info["platform"].split(' ').first
return unless new_version
- if File.exists?(SUMMARY_LOG) && File.size(SUMMARY_LOG) != 0
+ if File.exist?(SUMMARY_LOG) && File.size(SUMMARY_LOG) != 0
file = SUMMARY_LOG
- elsif File.exists?(SUMMARY_LOG_1) && File.size(SUMMARY_LOG_1) != 0
+ elsif File.exist?(SUMMARY_LOG_1) && File.size(SUMMARY_LOG_1) != 0
file = SUMMARY_LOG_1
else
return
@@ -195,7 +195,7 @@ end
# Return a ruby object representing the contents of the hiera yaml file.
#
def hiera_file
- unless File.exists?(HIERA_FILE)
+ unless File.exist?(HIERA_FILE)
log("ERROR: hiera file '#{HIERA_FILE}' does not exist.")
exit(1)
end