Merge pull request #57 from natemccurdy/config_version
Config Version Improvements
This commit is contained in:
commit
aaa85a0e03
@ -6,7 +6,8 @@ environmentpath = ARGV[0]
|
|||||||
environment = ARGV[1]
|
environment = ARGV[1]
|
||||||
|
|
||||||
# Get the hostname of the Puppet master compiling the catalog.
|
# 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.
|
# Get the path to the Code Manager deployment info file.
|
||||||
r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json')
|
r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/opt/puppetlabs/puppet/bin/ruby
|
||||||
begin
|
begin
|
||||||
require 'rugged'
|
require 'rugged'
|
||||||
require 'socket'
|
require 'socket'
|
||||||
@ -10,7 +10,8 @@ else
|
|||||||
environment = ARGV[1]
|
environment = ARGV[1]
|
||||||
|
|
||||||
# Get the hostname of the Puppet master compiling the catalog.
|
# 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.
|
# Get the path to the environment being compiled.
|
||||||
repo = Rugged::Repository.discover(File.join(environmentpath, environment))
|
repo = Rugged::Repository.discover(File.join(environmentpath, environment))
|
||||||
|
Loading…
Reference in New Issue
Block a user