Skip to content

Commit

Permalink
Merge pull request #191 from treydock/srv-domain-env
Browse files Browse the repository at this point in the history
(#190) Allow setting SRV domain using environment variable
  • Loading branch information
ripienaar authored Jan 2, 2024
2 parents d7a864e + 3f86876 commit 48f3e80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/mcollective/pluginpackager/forge_packager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def render_templates
end

def render_template(infile, outfile)
erb = ERB.new(File.read(infile), safe_level:0, trim_mode:"-")
erb = ERB.new(File.read(infile), :safe_level => 0, :trim_mode => "-")
File.open(outfile, "w") do |f|
f.puts erb.result(binding)
end
Expand Down
5 changes: 3 additions & 2 deletions lib/mcollective/util/choria.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ def facter_domain

# Determines the domain to do SRV lookups in
#
# This is settable using choria.srv_domain and defaults
# This is settable using the environment variable
# CHORIA_SRV_DOMAIN or choria.srv_domain and defaults
# to the domain as reported by facter
#
# @return [String]
def srv_domain
get_option("choria.srv_domain", nil) || facter_domain
env_fetch("CHORIA_SRV_DOMAIN", nil) || get_option("choria.srv_domain", nil) || facter_domain
end

# Determines the SRV records to look up
Expand Down

0 comments on commit 48f3e80

Please sign in to comment.