r10k 3.15.1 → 3.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.mkd +4 -0
- data/README.mkd +11 -0
- data/lib/r10k/action/puppetfile/install.rb +2 -1
- data/lib/r10k/cli/puppetfile.rb +1 -0
- data/lib/r10k/module_loader/puppetfile.rb +10 -1
- data/lib/r10k/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b8f47b9b316994e718214a6f92e25b7dcd6f9e402e73ddee076920ac65b8317
|
4
|
+
data.tar.gz: '03847035922476e3fc27030c231cbb362ceac63387c4d300443a401eca298f16'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db1c6069ec189325027ee5e4015d1b659afc410f5840daacc7d21b724288c1d9e86c2e55792760d8b13ef981794d18c25db9977a5e56002898de005ca6a54b55
|
7
|
+
data.tar.gz: c3d8dca548fb0e57eba9b9a2df5a37c74d4ebdb74f224e9c03f8ee112f3708c8cc4b9630cfe671c944f30089052d5c4275c5e2a44df3ed015b59e3c710b7b40f
|
data/CHANGELOG.mkd
CHANGED
@@ -4,6 +4,10 @@ CHANGELOG
|
|
4
4
|
Unreleased
|
5
5
|
----------
|
6
6
|
|
7
|
+
3.15.2
|
8
|
+
------
|
9
|
+
- Implement exclude regex for puppetfile install [#1248](https://github.com/puppetlabs/r10k/issues/1248)
|
10
|
+
|
7
11
|
3.15.1
|
8
12
|
------
|
9
13
|
- Add TOC to configuration docs [#1298](https://github.com/puppetlabs/r10k/issues/1298)
|
data/README.mkd
CHANGED
@@ -5,6 +5,13 @@ Puppet environment and module deployment
|
|
5
5
|
|
6
6
|
[](https://travis-ci.org/puppetlabs/r10k)
|
7
7
|
|
8
|
+
> R10k is supported and maintained by Puppet, but we consider it to be feature complete
|
9
|
+
> and currently have no plans for future feature development. We will keep it working
|
10
|
+
> with current code deployment standards and the Ruby ecosystem that ships with the
|
11
|
+
> puppet-agent package, but any new feature development will come from peer-reviewed
|
12
|
+
> community contributions, with the onus on the contributor and community for validation.
|
13
|
+
|
14
|
+
|
8
15
|
Description
|
9
16
|
-----------
|
10
17
|
|
@@ -14,6 +21,10 @@ R10k provides a general purpose toolset for deploying Puppet environments and
|
|
14
21
|
modules. It implements the [Puppetfile](doc/puppetfile.mkd) format and provides a native
|
15
22
|
implementation of Puppet [environments][workflow].
|
16
23
|
|
24
|
+
You might also consider [g10k](https://github.com/xorpaul/g10k) as a non-ruby
|
25
|
+
based alternative.
|
26
|
+
|
27
|
+
|
17
28
|
Requirements
|
18
29
|
------------
|
19
30
|
|
@@ -14,6 +14,7 @@ module R10K
|
|
14
14
|
options = { basedir: @root, overrides: { force: @force || false } }
|
15
15
|
options[:moduledir] = @moduledir if @moduledir
|
16
16
|
options[:puppetfile] = @puppetfile if @puppetfile
|
17
|
+
options[:module_exclude_regex] = @module_exclude_regex if @module_exclude_regex
|
17
18
|
|
18
19
|
loader = R10K::ModuleLoader::Puppetfile.new(**options)
|
19
20
|
loaded_content = loader.load!
|
@@ -40,7 +41,7 @@ module R10K
|
|
40
41
|
private
|
41
42
|
|
42
43
|
def allowed_initialize_opts
|
43
|
-
super.merge(root: :self, puppetfile: :self, moduledir: :self, force: :self )
|
44
|
+
super.merge(root: :self, puppetfile: :self, moduledir: :self, :'module-exclude-regex' => :self, force: :self )
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
data/lib/r10k/cli/puppetfile.rb
CHANGED
@@ -31,6 +31,7 @@ Puppetfile (http://bombasticmonkey.com/librarian-puppet/).
|
|
31
31
|
summary 'Install all modules from a Puppetfile'
|
32
32
|
option nil, :moduledir, 'Path to install modules to', argument: :required
|
33
33
|
option nil, :puppetfile, 'Path to puppetfile', argument: :required
|
34
|
+
option nil, :'module-exclude-regex', 'A regex to exclude modules from installation. Helpful in CI environments.', argument: :required
|
34
35
|
flag nil, :force, 'Force locally changed files to be overwritten'
|
35
36
|
runner R10K::Action::Puppetfile::CriRunner.wrap(R10K::Action::Puppetfile::Install)
|
36
37
|
end
|
@@ -30,17 +30,21 @@ module R10K
|
|
30
30
|
# @param overrides [Hash] Configuration for loaded modules' behavior
|
31
31
|
# @param environment [R10K::Environment] When provided, the environment
|
32
32
|
# in which loading takes place
|
33
|
+
# @param module_exclude_regex [Regex] A regex to exclude modules from
|
34
|
+
# installation. Helpful in CI environments.
|
33
35
|
def initialize(basedir:,
|
34
36
|
moduledir: DEFAULT_MODULEDIR,
|
35
37
|
puppetfile: DEFAULT_PUPPETFILE_NAME,
|
36
38
|
overrides: {},
|
37
|
-
environment: nil
|
39
|
+
environment: nil,
|
40
|
+
module_exclude_regex: nil)
|
38
41
|
|
39
42
|
@basedir = cleanpath(basedir)
|
40
43
|
@moduledir = resolve_path(@basedir, moduledir)
|
41
44
|
@puppetfile_path = resolve_path(@basedir, puppetfile)
|
42
45
|
@overrides = overrides
|
43
46
|
@environment = environment
|
47
|
+
@module_exclude_regex = module_exclude_regex
|
44
48
|
@environment_name = @environment&.name
|
45
49
|
@default_branch_override = @overrides.dig(:environments, :default_branch_override)
|
46
50
|
@allow_puppetfile_forge = @overrides.dig(:forge, :allow_puppetfile_override)
|
@@ -68,6 +72,7 @@ module R10K
|
|
68
72
|
dsl.instance_eval(puppetfile_content(@puppetfile_path), @puppetfile_path)
|
69
73
|
|
70
74
|
validate_no_duplicate_names(@modules)
|
75
|
+
@modules = filter_modules(@modules, @module_exclude_regex) if @module_exclude_regex
|
71
76
|
|
72
77
|
managed_content = @modules.group_by(&:dirname)
|
73
78
|
|
@@ -223,6 +228,10 @@ module R10K
|
|
223
228
|
return [ install_path, info, spec_deletable ]
|
224
229
|
end
|
225
230
|
|
231
|
+
def filter_modules(modules, exclude_regex)
|
232
|
+
modules.reject { |mod| mod.name =~ /#{exclude_regex}/ }
|
233
|
+
end
|
234
|
+
|
226
235
|
# @param [Array<R10K::Module>] modules
|
227
236
|
def validate_no_duplicate_names(modules)
|
228
237
|
dupes = modules
|
data/lib/r10k/version.rb
CHANGED
@@ -2,5 +2,5 @@ module R10K
|
|
2
2
|
# When updating to a new major (X) or minor (Y) version, include `#major` or
|
3
3
|
# `#minor` (respectively) in your commit message to trigger the appropriate
|
4
4
|
# release. Otherwise, a new patch (Z) version will be released.
|
5
|
-
VERSION = '3.15.
|
5
|
+
VERSION = '3.15.2'
|
6
6
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.15.
|
4
|
+
version: 3.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored2
|