Skip to content

Commit

Permalink
(#190) Allow setting SRV domain using environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Dec 18, 2023
1 parent d7a864e commit 7370b1e
Showing 1 changed file with 3 additions and 2 deletions.
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 7370b1e

Please sign in to comment.