18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/lib/actions/katello/foreman/content_update.rb', line 18
def finalize
environment = ::Katello::KTEnvironment.find(input[:environment_id])
content_view = ::Katello::ContentView.find(input[:content_view_id])
repository = ::Katello::Repository.find(input[:repository_id]) if input[:repository_id]
if content_view.default? && repository
if repository.distribution_bootable?
os = Redhat.find_or_create_operating_system(repository)
arch = Architecture.where(:name => repository.distribution_arch).first_or_create!
os.architectures << arch unless os.architectures.include?(arch)
end
else
::Katello::Foreman.update_puppet_environment(content_view, environment)
end
end
|