Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ matrix:
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: spec
-
env: FACTER_GEM_VERSION='~> 3.11.0' PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: spec
-
env: DEPLOY_TO_FORGE=yes
stage: deploy
Expand Down
4 changes: 3 additions & 1 deletion lib/facter/lvm_support.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# lvm_support: true/nil
# Whether there is LVM support (based on the presence of the "vgs" command)
Facter.add('lvm_support') do
confine kernel: :linux
confine do
Facter.value('kernel') == 'Linux'
end

setcode do
vgdisplay = Facter::Util::Resolution.which('vgs')
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/lvm_support_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end

context 'when not on Linux' do
it 'is set to not' do
it 'is set to nil' do
Facter.fact(:kernel).expects(:value).at_least(1).returns('SunOs')
Facter.value(:lvm_support).should be_nil
end
Expand Down