The list of accepted packages not from apt repo is automatically

generated with fact.
This commit is contained in:
gardouille 2015-02-16 18:42:21 +01:00
parent d0606df123
commit 27b5a9b61f
4 changed files with 38 additions and 0 deletions

9
lib/facter/is_gitlab.rb Normal file
View File

@ -0,0 +1,9 @@
#is_gitlab.rb
Facter.add("is_gitlab") do
setcode do
FileTest.exists?("/usr/bin/X11/gitlab-ctl")
end
end

View 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

View 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

View File

@ -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 -%>