Sha256: 214f684732088b7a965f179ed68ce1ddb0a2f1ebc5df30bb44c9d296be1177b6

Contents?: true

Size: 723 Bytes

Versions: 81

Compression:

Stored size: 723 Bytes

Contents

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
#

# Create a new location to be used as the Katello Default.
if ENV['SEED_LOCATION'].blank?
  default_location = Location.first
else
  default_location = Location.where(:name => ENV['SEED_LOCATION']).first_or_create
end
if Setting[:default_location_subscribed_hosts].empty?
  Setting[:default_location_subscribed_hosts] = default_location.title
end
if Setting[:default_location_puppet_content].empty?
  Setting[:default_location_puppet_content] = default_location.title
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
katello-4.0.3 db/seeds.d/101-locations.rb
katello-3.18.5 db/seeds.d/101-locations.rb
katello-4.0.2.1 db/seeds.d/101-locations.rb
katello-4.0.2 db/seeds.d/101-locations.rb
katello-3.18.4 db/seeds.d/101-locations.rb
katello-4.0.1.2 db/seeds.d/101-locations.rb
katello-3.18.3.1 db/seeds.d/101-locations.rb
katello-4.0.1.1 db/seeds.d/101-locations.rb
katello-3.18.3 db/seeds.d/101-locations.rb
katello-4.0.1 db/seeds.d/101-locations.rb
katello-4.0.0 db/seeds.d/101-locations.rb
katello-4.0.0.rc3.1 db/seeds.d/101-locations.rb
katello-4.0.0.rc3 db/seeds.d/101-locations.rb
katello-3.18.2.1 db/seeds.d/101-locations.rb
katello-3.18.2 db/seeds.d/101-locations.rb
katello-3.17.3 db/seeds.d/101-locations.rb
katello-4.0.0.rc2 db/seeds.d/101-locations.rb
katello-3.18.1.1 db/seeds.d/101-locations.rb
katello-3.17.2 db/seeds.d/101-locations.rb
katello-4.0.0.rc1 db/seeds.d/101-locations.rb