Revision a653e389
Added by Ewoud Kohl van Wijngaarden about 6 years ago
app/models/setting/general.rb | ||
---|---|---|
require 'facter'
|
||
class Setting::General < Setting
|
||
include UrlValidator
|
||
|
||
... | ... | |
protocol = SETTINGS[:require_ssl] ? 'https' : 'http'
|
||
domain = SETTINGS[:domain]
|
||
administrator = "root@#{domain}"
|
||
foreman_url = "#{protocol}://#{Facter.value(:fqdn) || SETTINGS[:fqdn]}"
|
||
foreman_url = "#{protocol}://#{SETTINGS[:fqdn]}"
|
||
|
||
[
|
||
self.set('administrator', N_("The default administrator email address"), administrator, N_('Administrator email address')),
|
Also available in: Unified diff
Fixes #23635 - Centralize use of facter
We have a bundler group for facter. That implies it's optional but
before this change it wasn't With this change it's only required if no
domain and fqdn are set. This is still the default so in most cases it's
no difference, but at least we have centralized all use of facter to one
place.