Skip to content

Commit 048614c

Browse files
authored
Merge pull request #128 from voxpupuli/modulesync
modulesync 10.6.0
2 parents e9f7abc + a51c411 commit 048614c

14 files changed

Lines changed: 167 additions & 116 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
21
{
32
"name": "VoxBox",
43
"image": "ghcr.io/voxpupuli/voxbox:latest"

.github/workflows/create_tag.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
name: Create Git tag
6+
7+
on:
8+
workflow_dispatch:
9+
10+
permissions: {}
11+
12+
jobs:
13+
create_tag:
14+
uses: 'voxpupuli/gha-puppet/.github/workflows/create_tag.yml@v4'
15+
with:
16+
allowed_owner: 'voxpupuli'
17+
git_name: 'pccibot'
18+
git_email: '12855858+pccibot@users.noreply.github.com'
19+
secrets:
20+
# Configure secrets here:
21+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
22+
ssh_private_key: ${{ secrets.PCCI_SSH_PRIVATE_KEY }}

.github/workflows/prepare_release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ permissions:
1717

1818
jobs:
1919
release_prep:
20-
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
20+
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v4'
2121
with:
2222
version: ${{ github.event.inputs.version }}
2323
allowed_owner: 'voxpupuli'
24+
git_name: 'pccibot'
25+
git_email: '12855858+pccibot@users.noreply.github.com'
2426
secrets:
2527
# Configure secrets here:
2628
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
2729
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'
30+
ssh_private_key: '${{ secrets.PCCI_SSH_PRIVATE_KEY }}'

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ name: Release
88
on:
99
push:
1010
tags:
11-
- '*'
11+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushbranchestagsbranches-ignoretags-ignore
12+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#filter-pattern-cheat-sheet
13+
- 'v[0-9]+.[0-9]+.[0-9]+'
1214

1315
permissions:
1416
contents: write
1517

1618
jobs:
1719
release:
1820
name: Release
19-
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
21+
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v4
2022
with:
2123
allowed_owner: 'voxpupuli'
2224
secrets:

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Managed by modulesync - DO NOT EDIT
33
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
44

5-
modulesync_config_version: '10.5.0'
5+
modulesync_config_version: '10.7.0'

.rubocop_todo.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
2-
# `rubocop --auto-gen-config`
3-
# on 2023-08-17 21:30:05 UTC using RuboCop version 1.50.2.
2+
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
3+
# using RuboCop version 1.85.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -33,6 +33,18 @@ RSpec/InstanceVariable:
3333
- 'spec/unit/puppet/provider/sshd_config_subsystem/augeas_spec.rb'
3434
- 'spec/unit/puppet/provider/sshkey/augeas_spec.rb'
3535

36+
# Offense count: 9
37+
RSpec/LeakyLocalVariable:
38+
Exclude:
39+
- 'spec/unit/puppet/provider/ssh_config/augeas_spec.rb'
40+
- 'spec/unit/puppet/provider/sshd_config/augeas_spec.rb'
41+
- 'spec/unit/puppet/provider/sshd_config_match/augeas_spec.rb'
42+
- 'spec/unit/puppet/provider/sshd_config_subsystem/augeas_spec.rb'
43+
- 'spec/unit/puppet/provider/sshkey/augeas_spec.rb'
44+
- 'spec/unit/puppet/type/ssh_config_spec.rb'
45+
- 'spec/unit/puppet/type/sshd_config_match_spec.rb'
46+
- 'spec/unit/puppet/type/sshd_config_spec.rb'
47+
3648
# Offense count: 3
3749
RSpec/UnspecifiedException:
3850
Exclude:
@@ -54,3 +66,16 @@ Style/AsciiComments:
5466
- 'lib/puppet/type/sshd_config.rb'
5567
- 'lib/puppet/type/sshd_config_match.rb'
5668
- 'lib/puppet/type/sshd_config_subsystem.rb'
69+
70+
# Offense count: 1
71+
# Configuration parameters: AllowedClasses.
72+
Style/OneClassPerFile:
73+
Exclude:
74+
- 'lib/puppet/provider/sshkey/augeas.rb'
75+
76+
# Offense count: 1
77+
# This cop supports unsafe autocorrection (--autocorrect-all).
78+
# Configuration parameters: AllowedMethods, AllowedPatterns.
79+
Style/ReturnNilInPredicateMethodDefinition:
80+
Exclude:
81+
- 'lib/puppet/provider/sshd_config_match/augeas.rb'

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
55

66
group :test do
7-
gem 'voxpupuli-test', '~> 13.0', :require => false
7+
gem 'voxpupuli-test', '~> 14.0', :require => false
88
gem 'puppet_metadata', '~> 6.0', :require => false
99
gem 'ruby-augeas', :require => false
1010
end
@@ -19,7 +19,7 @@ group :system_tests do
1919
end
2020

2121
group :release do
22-
gem 'voxpupuli-release', '~> 5.0', :require => false
22+
gem 'voxpupuli-release', '~> 5.3', :require => false
2323
end
2424

2525
gem 'rake', :require => false

lib/puppet/provider/sshd_config/augeas.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def self.instances
117117
resources = []
118118
# Ordinary settings outside of match blocks
119119
# Find all unique setting names, then find all instances of it
120-
settings = aug.match("$target/*[label()!='Match']").
121-
map { |spath| path_label(aug, spath) }.
122-
uniq.reject { |name| name.start_with?('#', '@') }
120+
settings = aug.match("$target/*[label()!='Match']")
121+
.map { |spath| path_label(aug, spath) }
122+
.uniq.reject { |name| name.start_with?('#', '@') }
123123

124124
settings.each do |name|
125125
next if name.casecmp('subsystem').zero?
@@ -139,16 +139,16 @@ def self.instances
139139
end
140140
cond_str = conditions.join(' ')
141141

142-
settings = aug.match("#{mpath}/Settings/*").
143-
map { |spath| path_label(aug, spath) }.
144-
uniq.reject { |name| name.start_with?('#', '@') }
142+
settings = aug.match("#{mpath}/Settings/*")
143+
.map { |spath| path_label(aug, spath) }
144+
.uniq.reject { |name| name.start_with?('#', '@') }
145145

146146
settings.each do |name|
147147
next if name.casecmp('subsystem').zero?
148148

149149
value = get_value(aug, "#{mpath}/Settings/#{name}")
150150
entry = { ensure: :present, name: name,
151-
value: value, condition: cond_str }
151+
value: value, condition: cond_str, }
152152
resources << new(entry) if entry[:value]
153153
end
154154
end

lib/puppet/type/sshd_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def should_to_s(new_value)
7878

7979
super(is_arr | Array(new_value))
8080
else
81-
super(new_value)
81+
super
8282
end
8383
end
8484
end

spec/unit/puppet/provider/ssh_config/augeas_spec.rb

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
name: 'ForwardAgent',
2020
value: 'yes',
2121
target: target,
22-
provider: 'augeas'
22+
provider: 'augeas',
2323
))
2424

2525
aug_open(target, 'Ssh.lns') do |aug|
@@ -32,7 +32,7 @@
3232
name: 'GlobalKnownHostsFile',
3333
value: ['/etc/ssh/ssh_known_hosts', '/etc/ssh/ssh_known_hosts2'],
3434
target: target,
35-
provider: 'augeas'
35+
provider: 'augeas',
3636
))
3737

3838
aug_open(target, 'Ssh.lns') do |aug|
@@ -46,7 +46,7 @@
4646
name: 'SendEnv',
4747
value: %w[LANG LC_TYPE],
4848
target: target,
49-
provider: 'augeas'
49+
provider: 'augeas',
5050
))
5151

5252
aug_open(target, 'Ssh.lns') do |aug|
@@ -61,7 +61,7 @@
6161
host: 'example.net',
6262
value: 'yes',
6363
target: target,
64-
provider: 'augeas'
64+
provider: 'augeas',
6565
))
6666

6767
aug_open(target, 'Ssh.lns') do |aug|
@@ -76,7 +76,7 @@
7676
value: 'example_user',
7777
target: target,
7878
provider: 'augeas',
79-
comment: 'Deny example_user access'
79+
comment: 'Deny example_user access',
8080
))
8181

8282
aug_open(target, 'Ssh.lns') do |aug|
@@ -92,15 +92,15 @@
9292
name: 'ForwardAgent',
9393
value: 'no',
9494
target: target,
95-
provider: 'augeas'
95+
provider: 'augeas',
9696
),
9797
Puppet::Type.type(:ssh_config).new(
9898
name: 'ForwardAgent',
9999
host: 'example.net',
100100
value: 'yes',
101101
target: target,
102-
provider: 'augeas'
103-
)
102+
provider: 'augeas',
103+
),
104104
)
105105
end.to raise_error(Puppet::Resource::Catalog::DuplicateResourceError)
106106
end
@@ -112,15 +112,15 @@
112112
name: 'ForwardAgent',
113113
value: 'no',
114114
target: target,
115-
provider: 'augeas'
115+
provider: 'augeas',
116116
),
117117
Puppet::Type.type(:ssh_config).new(
118118
name: 'Example ForwardAgent',
119119
key: 'ForwardAgent',
120120
value: 'yes',
121121
target: target,
122-
provider: 'augeas'
123-
)
122+
provider: 'augeas',
123+
),
124124
)
125125
end.to raise_error
126126
end
@@ -132,16 +132,16 @@
132132
name: 'ForwardAgent',
133133
value: 'no',
134134
target: target,
135-
provider: 'augeas'
135+
provider: 'augeas',
136136
),
137137
Puppet::Type.type(:ssh_config).new(
138138
name: 'Example ForwardAgent',
139139
key: 'ForwardAgent',
140140
host: 'example.net',
141141
value: 'yes',
142142
target: target,
143-
provider: 'augeas'
144-
)
143+
provider: 'augeas',
144+
),
145145
)
146146
end.not_to raise_error
147147
end
@@ -180,7 +180,7 @@
180180
host: 'example.net',
181181
value: 'yes',
182182
target: target,
183-
provider: 'augeas'
183+
provider: 'augeas',
184184
))
185185

186186
aug_open(target, 'Ssh.lns') do |aug|
@@ -194,7 +194,7 @@
194194
host: 'example.net',
195195
value: ['LC_*', 'LANG'],
196196
target: target,
197-
provider: 'augeas'
197+
provider: 'augeas',
198198
))
199199

200200
aug_open(target, 'Ssh.lns') do |aug|
@@ -210,7 +210,7 @@
210210
value: 'example_user',
211211
target: target,
212212
provider: 'augeas',
213-
comment: 'Deny example_user access'
213+
comment: 'Deny example_user access',
214214
))
215215

216216
aug_open(target, 'Ssh.lns') do |aug|
@@ -226,7 +226,7 @@
226226
ensure: 'absent',
227227
host: '*',
228228
target: target,
229-
provider: 'augeas'
229+
provider: 'augeas',
230230
))
231231

232232
aug_open(target, 'Ssh.lns') do |aug|
@@ -240,7 +240,7 @@
240240
ensure: 'absent',
241241
host: '*',
242242
target: target,
243-
provider: 'augeas'
243+
provider: 'augeas',
244244
))
245245

246246
aug_open(target, 'Ssh.lns') do |aug|
@@ -256,7 +256,7 @@
256256
host: '*',
257257
value: 'no',
258258
target: target,
259-
provider: 'augeas'
259+
provider: 'augeas',
260260
))
261261

262262
aug_open(target, 'Ssh.lns') do |aug|
@@ -270,7 +270,7 @@
270270
host: '*',
271271
target: target,
272272
provider: 'augeas',
273-
comment: 'This is a different comment'
273+
comment: 'This is a different comment',
274274
))
275275

276276
aug_open(target, 'Ssh.lns') do |aug|
@@ -284,7 +284,7 @@
284284
host: '*',
285285
value: %w[foo bar],
286286
target: target,
287-
provider: 'augeas'
287+
provider: 'augeas',
288288
))
289289

290290
aug_open(target, 'Ssh.lns') do |aug|
@@ -299,7 +299,7 @@
299299
name: 'GssaPiaUthentication',
300300
value: 'yes',
301301
target: target,
302-
provider: 'augeas'
302+
provider: 'augeas',
303303
))
304304

305305
aug_open(target, 'Ssh.lns') do |aug|
@@ -319,7 +319,7 @@
319319
name: 'ForwardAgent',
320320
value: 'yes',
321321
target: target,
322-
provider: 'augeas'
322+
provider: 'augeas',
323323
))
324324

325325
expect(txn.any_failed?).not_to eq(nil)

0 commit comments

Comments
 (0)