beaker_puppet_helpers 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +5 -1
- data/CHANGELOG.md +23 -1
- data/Gemfile +1 -0
- data/README.md +6 -0
- data/beaker_puppet_helpers.gemspec +1 -1
- data/lib/beaker_puppet_helpers/dsl.rb +8 -2
- data/lib/beaker_puppet_helpers/install_utils.rb +1 -1
- data/spec/beaker_puppet_helpers/dsl_spec.rb +8 -0
- 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: d28abba553fcbffcbb66b9a3c822f7b287489ea2f6178b99f2a39b074cda9bf2
|
4
|
+
data.tar.gz: 252d2c337b2d98674bb4e1c9ad7738db7026de09c257a4e198b782489f585e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 673fca50dfbe74636f9742007806293adda15db06ce871a654f0d8a7325c182eefc08737a7dfd98222a5ead19d13ad17ff15646ba2e44a12a58f8aba7b9ac03c
|
7
|
+
data.tar.gz: 3819be2fbf16501df9229a7d6b3b727643fbf4a7c9de2b20b6214855f4d866d173951f841badf63fa651287901cd23153783ab2d65fce874068c668e2d7da693
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,29 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [1.
|
5
|
+
## [1.1.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.1.1) (2023-06-16)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.1.0...1.1.1)
|
8
|
+
|
9
|
+
**Fixed bugs:**
|
10
|
+
|
11
|
+
- fix typo in EL package selection [\#32](https://github.com/voxpupuli/beaker_puppet_helpers/pull/32) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
|
13
|
+
**Merged pull requests:**
|
14
|
+
|
15
|
+
- CI: Run on PRs+merges to master [\#33](https://github.com/voxpupuli/beaker_puppet_helpers/pull/33) ([bastelfreak](https://github.com/bastelfreak))
|
16
|
+
- README.md: Correct link to CI jobs [\#30](https://github.com/voxpupuli/beaker_puppet_helpers/pull/30) ([bastelfreak](https://github.com/bastelfreak))
|
17
|
+
- GCG: Add faraday-retry dep [\#29](https://github.com/voxpupuli/beaker_puppet_helpers/pull/29) ([bastelfreak](https://github.com/bastelfreak))
|
18
|
+
|
19
|
+
## [1.1.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.1.0) (2023-06-01)
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.1...1.1.0)
|
22
|
+
|
23
|
+
**Implemented enhancements:**
|
24
|
+
|
25
|
+
- Add support for `--show_diff` [\#27](https://github.com/voxpupuli/beaker_puppet_helpers/pull/27) ([smortex](https://github.com/smortex))
|
26
|
+
|
27
|
+
## [1.0.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.1) (2023-05-10)
|
6
28
|
|
7
29
|
[Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.0...1.0.1)
|
8
30
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Beaker Puppet Helpers
|
2
2
|
|
3
|
+
[![License](https://img.shields.io/github/license/voxpupuli/beaker_puppet_helpers.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/blob/master/LICENSE)
|
4
|
+
[![Test](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/test.yml)
|
5
|
+
[![Release](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml)
|
6
|
+
[![RubyGem Version](https://img.shields.io/gem/v/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
|
7
|
+
[![RubyGem Downloads](https://img.shields.io/gem/dt/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
|
8
|
+
|
3
9
|
The purpose of this library is to hold Puppet-specific info & DSL methods.
|
4
10
|
This includes all helper & installer methods.
|
5
11
|
|
@@ -89,10 +89,15 @@ module BeakerPuppetHelpers
|
|
89
89
|
#
|
90
90
|
# @option opts [String] :hiera_config The path of the hiera.yaml configuration.
|
91
91
|
#
|
92
|
-
# @option opts [
|
92
|
+
# @option opts [Boolean] :debug (false) If this option exists,
|
93
93
|
# the "--debug" command line parameter
|
94
94
|
# will be passed to the 'puppet apply' command.
|
95
|
-
#
|
95
|
+
#
|
96
|
+
# @option opts [Boolean] :run_in_parallel Whether to run on each host in parallel.
|
97
|
+
#
|
98
|
+
# @option opts [Boolean] :show_diff (false) If this option exists,
|
99
|
+
# the "--show_diff=true" command line parameter
|
100
|
+
# will be passed to the 'puppet apply' command.
|
96
101
|
#
|
97
102
|
# @param [Block] block This method will yield to a block of code passed
|
98
103
|
# by the caller; this can be used for additional
|
@@ -118,6 +123,7 @@ module BeakerPuppetHelpers
|
|
118
123
|
puppet_apply_opts[:modulepath] = opts[:modulepath] if opts[:modulepath]
|
119
124
|
puppet_apply_opts[:hiera_config] = opts[:hiera_config] if opts[:hiera_config]
|
120
125
|
puppet_apply_opts[:noop] = nil if opts[:noop]
|
126
|
+
puppet_apply_opts[:show_diff] = nil if opts[:show_diff]
|
121
127
|
|
122
128
|
# From puppet help:
|
123
129
|
# "... an exit code of '2' means there were changes, an exit code of
|
@@ -78,7 +78,7 @@ module BeakerPuppetHelpers
|
|
78
78
|
# @return [String] The Puppet package name
|
79
79
|
def self.puppet_package_name(host, prefer_aio: true)
|
80
80
|
case host['packaging_platform'].split('-', 3).first
|
81
|
-
when /el
|
81
|
+
when /el|fedora|sles|cisco_|debian|ubuntu/
|
82
82
|
prefer_aio ? 'puppet-agent' : 'puppet'
|
83
83
|
when /freebsd/
|
84
84
|
'sysutils/puppet'
|
@@ -166,6 +166,14 @@ describe BeakerPuppetHelpers::DSL do
|
|
166
166
|
|
167
167
|
dsl.apply_manifest_on(agent, 'class { "boo": }', debug: true)
|
168
168
|
end
|
169
|
+
|
170
|
+
it 'can set the --show_diff flag' do
|
171
|
+
expect(dsl).to receive(:create_remote_file).and_return(true)
|
172
|
+
expect(Beaker::PuppetCommand).to receive(:new).with('apply', anything, include(show_diff: nil)).and_return('puppet_command')
|
173
|
+
expect(dsl).to receive(:on).with(agent, 'puppet_command', acceptable_exit_codes: [0])
|
174
|
+
|
175
|
+
dsl.apply_manifest_on(agent, 'class { "boo": }', show_diff: true)
|
176
|
+
end
|
169
177
|
end
|
170
178
|
|
171
179
|
describe '#apply_manifest' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker_puppet_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beaker
|