Skip to content

Commit 3b76e81

Browse files
authored
Merge branch 'master' into master
2 parents 1179488 + bedd7bc commit 3b76e81

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

.fixtures.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
fixtures:
22
repositories:
33
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
4+
forge_modules:
5+
mount_core: "puppetlabs/mount_core"
46
symlinks:
57
"lvm": "#{source_dir}"

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ language: ruby
88
bundler_args: '--without development system_tests'
99

1010
before_install:
11-
- 'gem update --system'
11+
- 'gem update --system $RUBYGEMS_VERSION'
1212
- 'gem update bundler'
1313

1414
script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'
@@ -17,9 +17,13 @@ matrix:
1717
fast_finish: true
1818
include:
1919
- rvm: 2.1.6
20-
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
20+
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" RUBYGEMS_VERSION=2.7.8
2121
- rvm: 2.3.1
2222
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
23+
- rvm: 2.4.4
24+
env: PUPPET_GEM_VERSION="~> 5.0" STRICT_VARIABLES="yes"
25+
- rvm: 2.5.1
26+
env: PUPPET_GEM_VERSION="~> 6.0" STRICT_VARIABLES="yes"
2327

2428
notifications:
2529
email: false

lib/facter/lvm_support.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
Facter.add('lvm_vgs') do
1616
confine :lvm_support => true
1717

18-
vgs = Facter::Core::Execution.execute('vgs -o name --noheadings 2>/dev/null', timeout: 30)
19-
18+
if Facter.value(:lvm_support)
19+
vgs = Facter::Core::Execution.execute('vgs -o name --noheadings 2>/dev/null', timeout: 30)
20+
end
21+
2022
if vgs.nil?
2123
setcode { 0 }
2224
else
@@ -46,8 +48,9 @@
4648
pv_list = []
4749
Facter.add('lvm_pvs') do
4850
confine :lvm_support => true
49-
50-
pvs = Facter::Core::Execution.execute('pvs -o name --noheadings 2>/dev/null', timeout: 30)
51+
if Facter.value(:lvm_support)
52+
pvs = Facter::Core::Execution.execute('pvs -o name --noheadings 2>/dev/null', timeout: 30)
53+
end
5154

5255
if pvs.nil?
5356
setcode { 0 }

metadata.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{
1212
"name": "puppetlabs/stdlib",
1313
"version_requirement": ">= 4.13.1 < 6.0.0"
14+
},
15+
{
16+
"name": "puppetlabs/mount_core",
17+
"version_requirement": ">= 1.0.0 < 2.0.0"
1418
}
1519
],
1620
"data_provider": null,

tasks/mount_lv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Parse the parameters
66
# params = JSON.parse(STDIN.read)
7-
params = JSON.parse(File.read('/home/vagrant/mount_lv.json'))
7+
params = JSON.parse(STDIN.read)
88

99
# Set parameters to local variables and resolve defaults if required
1010
volume_group = params['volume_group']

0 commit comments

Comments
 (0)