Skip to content

Commit e489d84

Browse files
Merge pull request #321 from puppetlabs/pdk2.6
Pdk2.6.1
2 parents bc7bc0e + 98d4bc3 commit e489d84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+457
-415
lines changed

.devcontainer/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# devcontainer
2+
3+
4+
For format details, see https://aka.ms/devcontainer.json.
5+
6+
For config options, see the README at:
7+
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
8+
9+
``` json
10+
{
11+
"name": "Puppet Development Kit (Community)",
12+
"dockerFile": "Dockerfile",
13+
14+
// Set *default* container specific settings.json values on container create.
15+
"settings": {
16+
"terminal.integrated.profiles.linux": {
17+
"bash": {
18+
"path": "bash",
19+
}
20+
}
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": [
25+
"puppet.puppet-vscode",
26+
"rebornix.Ruby"
27+
],
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
"forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"postCreateCommand": "pdk --version",
34+
}
35+
```
36+
37+
38+

.devcontainer/devcontainer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
31
{
42
"name": "Puppet Development Kit (Community)",
53
"dockerFile": "Dockerfile",
64

7-
// Set *default* container specific settings.json values on container create.
85
"settings": {
9-
"terminal.integrated.shell.linux": "/bin/bash"
6+
"terminal.integrated.profiles.linux": {
7+
"bash": {
8+
"path": "bash"
9+
}
10+
}
1011
},
1112

12-
// Add the IDs of extensions you want installed when the container is created.
1313
"extensions": [
1414
"puppet.puppet-vscode",
1515
"rebornix.Ruby"
1616
]
17-
18-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19-
// "forwardPorts": [],
20-
21-
// Use 'postCreateCommand' to run commands after the container is created.
22-
// "postCreateCommand": "pdk --version",
2317
}

.puppet-lint.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
--relative
2+
--no-strict_indent-check
3+
--no-manifest_whitespace_missing_newline_end_of_file-check

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44
- rubocop-rspec
55
AllCops:
66
DisplayCopNames: true
7-
TargetRubyVersion: '2.4'
7+
TargetRubyVersion: '2.5'
88
Include:
99
- "**/*.rb"
1010
Exclude:

.sync.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Gemfile:
33
required:
44
':development':
5-
- gem: 'puppet-debugger'
6-
version: '>= 0.18.0'
75
- gem: 'bolt'
86
version: '>= 3.10.0'
97
optional:
@@ -13,6 +11,7 @@ Gemfile:
1311
version: '4.21.0' # Locked due to https://github.com/octokit/octokit.rb/issues/1391
1412
Rakefile:
1513
changelog_since_tag: '2.5.0'
14+
default_disabled_lint_checks: ['strict_indent','manifest_whitespace_missing_newline_end_of_file']
1615
extras:
1716
- 'PuppetSyntax.exclude_paths = ["plans/**/*.pp", "spec/acceptance/**/plans/**/*.pp", "vendor/**/*"]'
1817
spec/spec_helper.rb:
@@ -25,7 +24,11 @@ spec/spec_helper.rb:
2524
- '.plan_cache.json'
2625
- '.resource_types/'
2726
- 'bolt-debug.log'
27+
- 'spec/docker/**/*.tar.gz'
28+
- 'spec/docker/**/*.asc'
29+
- 'spec/docker/**/files/puppet-enterprise*'
30+
- 'spec/docker/.task_cache.json'
2831
.github/workflows/auto_release.yml:
29-
unmanaged: false
32+
unmanaged: true
3033
.github/workflows/release.yml:
3134
unmanaged: false

Gemfile

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,34 @@ def location_for(place_or_version, fake_version = nil)
1313
end
1414
end
1515

16-
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
17-
minor_version = ruby_version_segments[0..1].join('.')
18-
1916
group :development do
20-
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
21-
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
22-
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
23-
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
24-
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
25-
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
26-
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "puppet-debugger", '>= 0.18.0', require: false
28-
gem "bolt", '>= 3.17.0', require: false
29-
gem "github_changelog_generator", '>= 1.16.4', require: false
30-
gem "octokit", '4.21.0', require: false
17+
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
18+
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19+
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
20+
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
21+
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
22+
gem "voxpupuli-puppet-lint-plugins", '~> 3.1', require: false
23+
gem "facterdb", '~> 1.18', require: false
24+
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
25+
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
26+
gem "rspec-puppet-facts", '~> 2.0', require: false
27+
gem "codecov", '~> 0.2', require: false
28+
gem "dependency_checker", '~> 0.2', require: false
29+
gem "parallel_tests", '~> 3.4', require: false
30+
gem "pry", '~> 0.10', require: false
31+
gem "simplecov-console", '~> 0.5', require: false
32+
gem "puppet-debugger", '~> 1.0', require: false
33+
gem "rubocop", '= 1.6.1', require: false
34+
gem "rubocop-performance", '= 1.9.1', require: false
35+
gem "rubocop-rspec", '= 2.0.1', require: false
36+
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37+
gem "bolt", '>= 3.10.0', require: false
38+
gem "github_changelog_generator", require: false
39+
gem "octokit", '4.21.0', require: false
3140
end
3241
group :system_tests do
33-
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
34-
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
42+
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby]
43+
gem "serverspec", '~> 2.41', require: false
3544
end
3645

3746
puppet_version = ENV['PUPPET_GEM_VERSION']

README.md

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

33
This Puppet module contains Bolt plans used to deploy and manage Puppet Enterprise infrastructure. Plans are provided to automate common lifecycle activities in order to increase velocity and reduce the possibility of human error incurred by manually performing these activities.
44

5-
The peadm module is able to deploy and manage Puppet Enterprise 2019.x Standard, Large, and Extra Large architectures.
5+
The peadm module is able to deploy and manage Puppet Enterprise 2019.7 and higher for Standard, Large, and Extra Large architectures.
66

77
#### Table of Contents
88

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def changelog_future_release
4242
end
4343

4444
PuppetLint.configuration.send('disable_relative')
45+
PuppetLint.configuration.send('disable_strict_indent')
46+
PuppetLint.configuration.send('disable_manifest_whitespace_missing_newline_end_of_file')
4547

4648

4749
if Bundler.rubygems.find_name('github_changelog_generator').any?

examples/haproxy/compiler.pp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,20 @@
22
#
33
# lint:ignore:autoloader_layout
44
class examples::compiler {
5-
6-
@@haproxy::balancermember { "${::clientcert}_puppetserver_listener":
5+
@@haproxy::balancermember { "${facts['clientcert']}_puppetserver_listener":
76
listening_service => 'puppetserver',
8-
server_names => $::fqdn,
9-
ipaddresses => $::ipaddress,
7+
server_names => $facts['networking']['fqdn'],
8+
ipaddresses => $facts['networking']['ip'],
109
ports => '8140',
1110
options => 'check',
1211
}
1312

14-
@@haproxy::balancermember { "${::clientcert}_pcp-broker_listener":
13+
@@haproxy::balancermember { "${facts['clientcert']}_pcp-broker_listener":
1514
listening_service => 'pcp-broker',
16-
server_names => $::fqdn,
17-
ipaddresses => $::ipaddress,
15+
server_names => $facts['networking']['fqdn'],
16+
ipaddresses => $facts['networking']['ip'],
1817
ports => '8142',
1918
options => 'check',
2019
}
21-
2220
}
2321
# lint:endignore

examples/haproxy/load_balancer.pp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
#
66
# lint:ignore:autoloader_layout
77
class examples::load_balancer {
8-
98
class { 'haproxy':
109
global_options => {
11-
'log' => "${::ipaddress} local2",
10+
'log' => "${facts['facts[\'networking\'][\'ip\']']} local2",
1211
'chroot' => '/var/lib/haproxy',
1312
'pidfile' => '/var/run/haproxy.pid',
1413
'maxconn' => 5000,
@@ -24,14 +23,14 @@
2423
'client 2m',
2524
'server 2m',
2625
'http-request 120s',
27-
]
28-
}
26+
],
27+
},
2928
}
3029

3130
haproxy::listen { 'puppetserver':
3231
collect_exported => true,
3332
mode => 'tcp',
34-
ipaddress => $::ipaddress,
33+
ipaddress => $facts['networking']['ip'],
3534
ports => '8140',
3635
options => {
3736
option => ['tcplog'],
@@ -42,7 +41,7 @@
4241
haproxy::listen { 'pcp-broker':
4342
collect_exported => true,
4443
mode => 'tcp',
45-
ipaddress => $::ipaddress,
44+
ipaddress => $facts['networking']['ip'],
4645
ports => '8142',
4746
options => {
4847
option => ['tcplog'],
@@ -57,10 +56,9 @@
5756
# TODO: split load balancing into two pools, A and B
5857
haproxy::listen { 'puppetdb':
5958
collect_exported => true,
60-
ipaddress => $::ipaddress,
59+
ipaddress => $facts['networking']['ip'],
6160
ports => '8081',
6261
options => {},
6362
}
64-
6563
}
6664
# lint:endignore

0 commit comments

Comments
 (0)