simp-beaker-helpers 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +9 -1
- data/lib/simp/beaker_helpers.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2MyOTg3YzFjZjAxM2JjY2YxYmRkZjkxYzNiNTc5MGFmYTEwMTQ4OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmIwYjI4ODJlMmE2Y2FmM2VlMWU4ZTMwOGIzMDFmZTI0MGJlNjBjMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTZhY2UzMmFiZmVhOTUxNjZjYzA5NGM1N2YyNGExMmY5YjBkOTFiM2E5MmY5
|
10
|
+
MjlhODA1NDFkNWVlYzBlYTBmNjNhMjc3YTA0YmM2YTE1MDUwZTMyZTZiMDdm
|
11
|
+
ZGFmZGJkMTNhNDQyNjFmOGI0ZTMwNTVhOTA4NDFjOGI0NzM2NjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODBkODY1Y2M3YmQ3MTFmODdjNzcyZGNkNTlmZWE4ZjMxYjZiNTM1ZDIwZWVk
|
14
|
+
MWZiY2JhZTZhOTU3MjlhNTRmYzJiMDBhMDA5ZWI4ZDVmN2NhZmU4NWY4M2Ey
|
15
|
+
YTU2ZmE2YzY2ZTU4MGRmMWUyOWNhNWE3NjNiYTM4MzE0YTExYWI=
|
data/README.md
CHANGED
@@ -12,6 +12,7 @@ Methods to assist beaker acceptance tests for SIMP.
|
|
12
12
|
* [`run_fake_pki_ca_on`](#run_fake_pki_ca_on)
|
13
13
|
* [`copy_pki_to`](#copy_pki_to)
|
14
14
|
* [`copy_keydist_to`](#copy_keydist_to)
|
15
|
+
* [`pluginsync_on`](#pluginsync_on)
|
15
16
|
* [`set_hieradata_on`](#set_hieradata_on)
|
16
17
|
* [`clear_temp_hieradata`](#clear_temp_hieradata)
|
17
18
|
4. [Environment variables](#environment-variables)
|
@@ -94,7 +95,14 @@ Copy a CA keydist/ directory of CA+host certs into an SUT
|
|
94
95
|
|
95
96
|
This simulates the output of FakeCA's `gencerts_nopass.sh` into `keydist/` and is useful for constructing a Puppet master SUT that will distribute PKI keys via agent runs.
|
96
97
|
|
97
|
-
`
|
98
|
+
`copy_keydist_to( ca_sut = master )`
|
99
|
+
|
100
|
+
|
101
|
+
#### `pluginsync_on`
|
102
|
+
|
103
|
+
Simulates a custom fact pluginsync on given SUTs
|
104
|
+
|
105
|
+
`pluginsync_on( suts = hosts )`
|
98
106
|
|
99
107
|
|
100
108
|
#### `set_hieradata_on`
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Simp; end
|
2
2
|
|
3
3
|
module Simp::BeakerHelpers
|
4
|
-
VERSION = '1.0.
|
4
|
+
VERSION = '1.0.7'
|
5
5
|
|
6
6
|
# Locates .fixture.yml in or above this directory.
|
7
7
|
def fixtures_yml_path
|
@@ -279,4 +279,16 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
|
|
279
279
|
end
|
280
280
|
end
|
281
281
|
end
|
282
|
+
|
283
|
+
# pluginsync custom facts for all modules
|
284
|
+
def pluginsync_on( suts = hosts )
|
285
|
+
suts.each do |sut|
|
286
|
+
fact_path = on(sut, %q(puppet config print factpath)).output.strip.split(':').first
|
287
|
+
on(sut, %q(puppet config print modulepath)).output.strip.split(':').each do |mod_path|
|
288
|
+
on(sut, %Q(mkdir -p #{fact_path}))
|
289
|
+
next if on(sut, "ls #{mod_path}/*/lib/facter 2>/dev/null ", :accept_all_exit_codes => true).exit_code != 0
|
290
|
+
on(sut, %Q(find #{mod_path}/*/lib/facter -type f -name '*.rb' -exec cp -a {} '#{fact_path}/' \\; ))
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
282
294
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beaker
|