Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nest
Forks
Puppet Portage
Commits
be25277c
Commit
be25277c
authored
Feb 04, 2019
by
James T. Lee
Browse files
Remove broken 'eselect' custom facts
parent
e3f2ccf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
lib/facter/eselect.rb
lib/facter/eselect.rb
+0
-34
No files found.
lib/facter/eselect.rb
deleted
100644 → 0
View file @
e3f2ccf3
if
Facter
.
value
(
:operatingsystem
)
==
'Gentoo'
eselect_modules
=
%x(eselect modules list)
.
split
(
' '
).
reject!
{
|
c
|
c
.
empty?
}.
delete_if
{
|
c
|
c
[
"
\n
"
]
}
eselect_modules_blacklist
=
[
'help'
,
'usage'
,
'version'
,
'bashcomp'
,
'env'
,
'fontconfig'
,
'modules'
,
'news'
,
'rc'
,
]
eselect_modules
=
eselect_modules
-
eselect_modules_blacklist
eselect_modules_multitarget
=
{
'php'
=>
[
'cli'
,
'apache2'
,
'fpm'
,
'cgi'
],
}
def
facter_add
(
name
,
output
)
Facter
.
add
(
name
)
do
confine
:operatingsystem
=>
:gentoo
setcode
do
output
end
end
end
eselect_modules
.
each
do
|
eselect_module
|
if
(
submodules
=
eselect_modules_multitarget
[
eselect_module
])
submodules
.
each
do
|
target
|
output
=
%x{eselect --brief --color=no
#{
eselect_module
}
show
#{
target
}
}
.
strip
facter_add
(
"eselect_
#{
eselect_module
}
_
#{
target
}
"
,
output
)
end
else
output
=
%x{eselect --brief --color=no
#{
eselect_module
}
show}
.
strip
.
split
(
' '
)[
0
]
if
not
[
'(none)'
,
'(unset)'
].
include?
output
facter_add
(
"eselect_
#{
eselect_module
}
"
,
output
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment