Skip to content
This repository has been archived by the owner on Oct 18, 2019. It is now read-only.

Commit

Permalink
Fixes #17446 - Provide cloudapp.net domain by default
Browse files Browse the repository at this point in the history
Since Azure assigns that domain by default to all hosts, it makes sense
for the plugin to add this domain (w/o proxies associated) to Foreman so
people can use it.
  • Loading branch information
dLobatog committed Nov 22, 2016
1 parent f40119d commit b0a2253
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/seeds.d/70-cloudapp-domain.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
domain = Domain.where(:name => 'cloudapp.net').first_or_create
if domain.nil? || domain.errors.any?
raise "Unable to create domain: #{format_errors domain}"
end
6 changes: 6 additions & 0 deletions lib/foreman_azure/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class Engine < ::Rails::Engine
{ :assets => { :precompile => ['foreman_azure/host_os_azure_selected.js'] } }
end

initializer 'foreman_azure.load_app_instance_data' do |app|
ForemanAzure::Engine.paths['db/migrate'].existent.each do |path|
app.config.paths['db/migrate'] << path
end
end

config.to_prepare do
require 'fog/azure'
require 'fog/azure/models/compute/servers'
Expand Down

0 comments on commit b0a2253

Please sign in to comment.