Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
foreman_uuid_boot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LiU IT - Infrastructure
foreman_uuid_boot
Commits
269fbb41
Verified
Commit
269fbb41
authored
2 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Improve startup messaging
parent
77555ab9
No related branches found
No related tags found
No related merge requests found
Pipeline
#87899
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/foreman_uuid_boot/engine.rb
+13
-9
13 additions, 9 deletions
lib/foreman_uuid_boot/engine.rb
with
13 additions
and
9 deletions
lib/foreman_uuid_boot/engine.rb
+
13
−
9
View file @
269fbb41
...
@@ -28,16 +28,20 @@ module ForemanUuidBoot
...
@@ -28,16 +28,20 @@ module ForemanUuidBoot
config
.
to_prepare
do
config
.
to_prepare
do
::
Foreman
::
UnattendedInstallation
::
HostFinder
.
prepend
ForemanUuidBoot
::
HostFinderExtensions
::
Foreman
::
UnattendedInstallation
::
HostFinder
.
prepend
ForemanUuidBoot
::
HostFinderExtensions
# Slight hack for foreman_discovery - to store UUID for provision
if
Foreman
::
Plugin
.
installed?
(
'foreman_discovery'
)
begin
# Slight hack for foreman_discovery - to store UUID for provision
# Ensure that Host::Discovered applies host facets
begin
unless
::
Host
::
Discovered
.
include?
Facets
::
ModelExtensionsBase
# Ensure that Host::Discovered applies host facets
::
Host
::
Discovered
.
include
SelectiveClone
unless
::
Host
::
Discovered
.
include?
Facets
::
ModelExtensionsBase
::
Host
::
Discovered
.
include
Facets
::
ManagedHostExtensions
::
Host
::
Discovered
.
include
SelectiveClone
::
Host
::
Discovered
.
prepend
ForemanUuidBoot
::
HostDiscoveredExtensions
::
Host
::
Discovered
.
include
Facets
::
ManagedHostExtensions
::
Host
::
Discovered
.
prepend
ForemanUuidBoot
::
HostDiscoveredExtensions
Rails
.
logger
.
info
'ForemanUuidBoot: Extended foreman_discovery with facet support'
end
rescue
StandardError
=>
e
Rails
.
logger
.
warn
"ForemanUuidBoot: Failed to activate discovery extensions (
#{
e
}
)"
end
end
rescue
NameError
=>
e
Rails
.
logger
.
warn
"ForemanUuidBoot: Discovery not installed(
#{
e
}
), skipping discovery extensions"
end
end
rescue
StandardError
=>
e
rescue
StandardError
=>
e
Rails
.
logger
.
warn
"ForemanUuidBoot: skipping engine hook(
#{
e
}
)"
Rails
.
logger
.
warn
"ForemanUuidBoot: skipping engine hook(
#{
e
}
)"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment