[PATCH/foreman 1/1] fixes #1528 - tidy up the default settings loader

Attempts to tidy up the default settings a bit.

Signed-off-by: Mikael Fridh <frimik@gmail.com>

··· --- lib/foreman/default_settings/loader.rb | 38 ++++++++++++++++---------------- 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/lib/foreman/default_settings/loader.rb b/lib/foreman/default_settings/loader.rb
index 2afc2bf…56f9fdc 100644
— a/lib/foreman/default_settings/loader.rb
+++ b/lib/foreman/default_settings/loader.rb
@@ -24,36 +24,36 @@ module Foreman
Setting.transaction do
domain = Facter.domain
[

  •          set('administrator', "The Default administrator email address", "root@#{domain}"),
    
  •          set('foreman_url',   "The hostname where your foreman instance is running on", "foreman.#{domain}"),
    
  •          set('email_replay_address', "The email replay address for emails that foreman is sending", "Foreman-noreply@#{domain}"),
    
  •          set('entries_per_page', "The amount of records shown per page in foreman", 20),
    
  •          set('administrator', "The default administrator email address", "root@#{domain}"),
    
  •          set('foreman_url',   "The hostname where your Foreman instance is reachable", "foreman.#{domain}"),
    
  •          set('email_replay_address', "The email reply address for emails that Foreman is sending", "Foreman-noreply@#{domain}"),
    
  •          set('entries_per_page', "The amount of records shown per page in Foreman", 20),
             set('authorize_login_delegation',"Authorize login delegation with REMOTE_USER environment variable",false),
    
  •          set('idle_timeout',"Logoff users after a certian timeout, in minutes",60),
    
  •          set('idle_timeout',"Log out idle users after a certain number of minutes",60),
           ].each { |s| create s.update(:category => "General")}
    
           [
    
  •          set('root_pass',     "Default ecrypted root password on provisioned hosts default is 123123", "xybxa6JUkz63w"),
    
  •          set('safemode_render', "Enable safe mode config templates rendinging(recommended)", true),
    
  •          set('ssl_certificate', "SSL Certificate path that foreman would use to communicate with its proxies", Puppet.settings[:hostcert]),
    
  •          set('ssl_ca_file',  "SSL CA file that foreman would use to communicate with its proxies", Puppet.settings[:localcacert]),
    
  •          set('ssl_priv_key', "SSL Private Key file that foreman would use to communicate with its proxies", Puppet.settings[:hostprivkey]),
    
  •          set('manage_puppetca', "Should foreman automate certificate signing upon provisioning new host", true),
    
  •          set('ignore_puppet_facts_for_provisioning', "Does not update ipaddress and MAC values from puppet facts", false)
    
  •          set('root_pass',     "Default encrypted root password on provisioned hosts (default is 123123)", "xybxa6JUkz63w"),
    
  •          set('safemode_render', "Enable safe mode config templates rendering (recommended)", true),
    
  •          set('ssl_certificate', "SSL Certificate path that Foreman would use to communicate with its proxies", Puppet.settings[:hostcert]),
    
  •          set('ssl_ca_file',  "SSL CA file that Foreman will use to communicate with its proxies", Puppet.settings[:localcacert]),
    
  •          set('ssl_priv_key', "SSL Private Key file that Foreman will use to communicate with its proxies", Puppet.settings[:hostprivkey]),
    
  •          set('manage_puppetca', "Should Foreman automate certificate signing upon provisioning new host", true),
    
  •          set('ignore_puppet_facts_for_provisioning', "Does not update ipaddress and MAC values from Puppet facts", false)
           ].each { |s| create s.update(:category => "Provisioning")}
    
           [
             set('puppet_interval', "Puppet interval in minutes", 30 ),
    
  •          set('default_puppet_environment',"The Puppet environment foreman would default to in case it can't auto detect it", "production"),
    
  •          set('modulepath',"The Puppet default module path in case that Foreman can't auto detect it", "/etc/puppet/modules"),
    
  •          set('default_puppet_environment',"The Puppet environment Foreman will default to in case it can't auto detect it", "production"),
    
  •          set('modulepath',"The Puppet default module path in case Foreman can't auto detect it", "/etc/puppet/modules"),
             set('document_root', "Document root where puppetdoc files should be created", "#{Rails.root}/public/puppet/rdoc"),
    
  •          set('puppetrun', "Enables Puppetrun Support", false),
    
  •          set('puppet_server', "Default Puppet Server hostname", "puppet"),
    
  •          set('failed_report_email_notification', "Enable Email Alerts per each failed puppet report", false),
    
  •          set('puppetrun', "Enables Puppetrun support", false),
    
  •          set('puppet_server', "Default Puppet server hostname", "puppet"),
    
  •          set('failed_report_email_notification', "Enable Email alerts per each failed Puppet report", false),
             set('using_storeconfigs', "Foreman is sharing its database with Puppet Store configs", (!Puppet.settings.instance_variable_get(:@values)[:master][:dbadapter].empty? rescue false)),
    
  •          set('Default_variables_Lookup_Path', "The Default path in which foreman resolves host specific variables", ["fqdn", "hostgroup", "os", "domain"]),
    
  •          set('Default_variables_Lookup_Path', "The Default path in which Foreman resolves host specific variables", ["fqdn", "hostgroup", "os", "domain"]),
             set('Enable_Smart_Variables_in_ENC', "Should the smart variables be exposed via the ENC yaml output?", true),
    
  •          set('update_environment_from_facts', "Should foreman will update a host's environment from its facts", false)
    
  •          set('update_environment_from_facts', "Should Foreman update a host's environment from its facts", false)
           ].compact.each { |s| create s.update(:category => "Puppet")}
         end
         true
    


1.7.7.6


Mikael Fridh / www.marinsoftware.com
Sysadmin, Operations / Regus, 8th Floor
Marin Software / M�ster Samuelsgatan 60
Cell: +46-708-174-200 / 111 21 Stockholm