diff options
Diffstat (limited to 'scripts/config_version.rb')
-rwxr-xr-x | scripts/config_version.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/config_version.rb b/scripts/config_version.rb index 5aade34..3de7104 100755 --- a/scripts/config_version.rb +++ b/scripts/config_version.rb @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby +#!/opt/puppetlabs/puppet/bin/ruby begin require 'rugged' require 'socket' @@ -10,7 +10,8 @@ else environment = ARGV[1] # Get the hostname of the Puppet master compiling the catalog. - compiling_master = Socket.gethostname + # Sometimes the hostname is the fqdn, so we'll take the first segment. + compiling_master = Socket.gethostname.split('.').first # Get the path to the environment being compiled. repo = Rugged::Repository.discover(File.join(environmentpath, environment)) |