git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/scripts/code_manager_config_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/code_manager_config_version.rb')
-rwxr-xr-xscripts/code_manager_config_version.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/code_manager_config_version.rb b/scripts/code_manager_config_version.rb
index 1ef62af..beacabc 100755
--- a/scripts/code_manager_config_version.rb
+++ b/scripts/code_manager_config_version.rb
@@ -6,7 +6,8 @@ environmentpath = ARGV[0]
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 Code Manager deployment info file.
r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json')