Sha256: 9bd6ee46ec22eee2300ae0e0582b227d40ac147f5dc910670d93a751e7b697e8

Contents?: true

Size: 1.64 KB

Versions: 5

Compression:

Stored size: 1.64 KB

Contents

require 'puppet_setting'
class Setting::Provisioning < Setting

  def self.load_defaults
    # Check the table exists
    return unless super

    ppsettings = PuppetSetting.new.get :hostcert, :localcacert, :hostprivkey, :storeconfigs
    self.transaction do
      [
        self.set('root_pass', N_("Default encrypted root password on provisioned hosts (default is 123123)"), "xybxa6JUkz63w"),
        self.set('safemode_render', N_("Enable safe mode config templates rendering (recommended)"), true),
        self.set('ssl_certificate', N_("SSL Certificate path that Foreman would use to communicate with its proxies"), ppsettings[:hostcert]),
        self.set('ssl_ca_file', N_( "SSL CA file that Foreman will use to communicate with its proxies"), ppsettings[:localcacert]),
        self.set('ssl_priv_key', N_("SSL Private Key file that Foreman will use to communicate with its proxies"), ppsettings[:hostprivkey]),
        self.set('manage_puppetca', N_("Should Foreman automate certificate signing upon provisioning new host"), true),
        self.set('ignore_puppet_facts_for_provisioning', N_("Does not update ipaddress and MAC values from Puppet facts"), false),
        self.set('query_local_nameservers', N_("Should Foreman query the locally configured name server or the SOA/NS authorities"), false),
        self.set('remote_addr', N_("If Foreman is running behind Passenger or a remote loadbalancer, the ip should be set here"), "127.0.0.1"),
        self.set('token_duration', N_("Time in minutes installation tokens should be valid for, 0 to disable"), 0)
      ].each { |s| self.create s.update(:category => "Setting::Provisioning")}
    end

    true

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/models/setting/provisioning.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/models/setting/provisioning.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/models/setting/provisioning.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/models/setting/provisioning.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/models/setting/provisioning.rb