The list of accepted packages not from apt repo is automatically
generated with fact.
This commit is contained in:
parent
d0606df123
commit
27b5a9b61f
9
lib/facter/is_gitlab.rb
Normal file
9
lib/facter/is_gitlab.rb
Normal file
@ -0,0 +1,9 @@
|
||||
#is_gitlab.rb
|
||||
|
||||
Facter.add("is_gitlab") do
|
||||
setcode do
|
||||
FileTest.exists?("/usr/bin/X11/gitlab-ctl")
|
||||
end
|
||||
end
|
||||
|
||||
|
9
lib/facter/is_xymonclient.rb
Normal file
9
lib/facter/is_xymonclient.rb
Normal file
@ -0,0 +1,9 @@
|
||||
#is_xymonclient.rb
|
||||
|
||||
Facter.add("is_xymonclient") do
|
||||
setcode do
|
||||
FileTest.exists?("/usr/lib/xymon/client/bin/xymonclient.sh")
|
||||
end
|
||||
end
|
||||
|
||||
|
9
lib/facter/is_xymonserver.rb
Normal file
9
lib/facter/is_xymonserver.rb
Normal file
@ -0,0 +1,9 @@
|
||||
#is_xymonserver.rb
|
||||
|
||||
Facter.add("is_xymonserver") do
|
||||
setcode do
|
||||
FileTest.exists?("/usr/lib/xymon/server/bin/xymon")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
<%# If Xymon-client service is available -%>
|
||||
<%- if scope.lookupvar('::is_xymonclient') == 'true' -%>
|
||||
xymon-client
|
||||
hobbit-plugins
|
||||
<% end -%>
|
||||
<%# If Xymon-server service is available -%>
|
||||
<%- if scope.lookupvar('::is_xymonserver') == 'true' -%>
|
||||
xymon
|
||||
<% end -%>
|
||||
<%# If Gitlab service is available -%>
|
||||
<%- if scope.lookupvar('::is_gitlab') == 'true' -%>
|
||||
gitlab
|
||||
<% end -%>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user