Skip to content

Commit

Permalink
Update PDK
Browse files Browse the repository at this point in the history
  • Loading branch information
sircubbi committed Feb 21, 2023
1 parent e5e9a29 commit 54a728c
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 38 deletions.
8 changes: 6 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.4'
TargetRubyVersion: '2.5'
Include:
- "**/*.rb"
Exclude:
Expand Down
34 changes: 22 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@ def location_for(place_or_version, fake_version = nil)
end
end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
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))
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))
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
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))
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))
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))
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))
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))
gem "voxpupuli-puppet-lint-plugins", '~> 3.1', require: false
gem "facterdb", '~> 1.18', require: false
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
gem "rspec-puppet-facts", '~> 2.0', require: false
gem "codecov", '~> 0.2', require: false
gem "dependency_checker", '~> 0.2', require: false
gem "parallel_tests", '~> 3.4', require: false
gem "pry", '~> 0.10', require: false
gem "simplecov-console", '~> 0.5', require: false
gem "puppet-debugger", '~> 1.0', require: false
gem "rubocop", '= 1.6.1', require: false
gem "rubocop-performance", '= 1.9.1', require: false
gem "rubocop-rspec", '= 2.0.1', require: false
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby]
gem "serverspec", '~> 2.41', require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
1 change: 0 additions & 1 deletion manifests/home_server_pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
order => 20,
}
}

2 changes: 0 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
Optional[String] $package_ensure = 'installed',
String $radacctdir = $freeradius::params::radacctdir,
) inherits freeradius::params {

if $freeradius::fr_version !~ /^3/ {
notify { 'This module is only compatible with FreeRADIUS 3.': }
}
Expand Down Expand Up @@ -185,7 +184,6 @@
order => '95',
}


# Set up concat proxy file
concat { "${freeradius::fr_basepath}/proxy.conf":
owner => 'root',
Expand Down
2 changes: 1 addition & 1 deletion manifests/ldap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
) {
warning('The use of freeradius::ldap is deprecated. You must use freeradius::module::ldap instead')

freeradius::module::ldap {$name:
freeradius::module::ldap { $name:
ensure => $ensure,
identity => $identity,
password => $password,
Expand Down
3 changes: 1 addition & 2 deletions manifests/module/detail.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# == Define: freeradius::module::detail
#
define freeradius::module::detail (
Expand All @@ -16,7 +15,7 @@
validate_array($suppress)
}

freeradius::module {"detail.${name}":
freeradius::module { "detail.${name}":
ensure => $ensure,
content => template('freeradius/detail.erb'),
}
Expand Down
3 changes: 1 addition & 2 deletions manifests/module/eap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
Boolean $eap_gtc = true,
Boolean $eap_peap = true,
) {

freeradius::module{$name:
freeradius::module { $name:
ensure => $ensure,
content => template('freeradius/eap.erb'),
}
Expand Down
6 changes: 3 additions & 3 deletions manifests/module/files.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@
$usersdir = dirname($filename)
}

freeradius::module {$name:
freeradius::module { $name:
ensure => $ensure,
content => template('freeradius/files.erb'),
}

file {$usersdir:
file { $usersdir:
ensure => $manage_dir,
owner => 'root',
group => $fr_group,
mode => '0750',
require => Freeradius::Module[$name],
}

file {$userspath:
file { $userspath:
ensure => $ensure,
owner => 'root',
group => $fr_group,
Expand Down
2 changes: 1 addition & 1 deletion manifests/module/huntgroup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
) {
warning('Use of freeradius::module::huntgroup is deprecated. Use freeradius::huntgroup instead')

freeradius::huntgroup {$name:
freeradius::huntgroup { $name:
conditions => $conditions,
order => $order,
}
Expand Down
4 changes: 2 additions & 2 deletions manifests/module/ippool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
true => $ip_index,
default => regsubst($ip_index, /\${db_dir}/, $freeradius::params::fr_basepath),
}
file {$_file_path:
file { $_file_path:
ensure => 'present',
owner => $freeradius::params::fr_user,
group => $freeradius::params::fr_group,
mode => '0640',
}
file {$_index_path:
file { $_index_path:
ensure => 'present',
owner => $freeradius::params::fr_user,
group => $freeradius::params::fr_group,
Expand Down
2 changes: 1 addition & 1 deletion manifests/module/perl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$fr_group = $::freeradius::params::fr_group
$fr_service = $::freeradius::params::fr_service
$source = "${path}/${perl_filename}"
freeradius::module {'perl':
freeradius::module { 'perl':
ensure => $ensure,
content => template('freeradius/perl.erb'),
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/module/preprocess.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$fr_group = $::freeradius::params::fr_group
$fr_service = $::freeradius::params::fr_service

freeradius::module {'preprocess':
freeradius::module { 'preprocess':
ensure => $ensure,
content => template('freeradius/preprocess.erb'),
}
Expand Down
1 change: 0 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Default parameters for freeradius
class freeradius::params {

# Make an educated guess which version of FR we are running, based on the OS
case $::operatingsystem {
/RedHat|CentOS|Rocky/: {
Expand Down
2 changes: 1 addition & 1 deletion manifests/radsniff.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
enable => true,
}

systemd::unit_file {'radsniff.service':
systemd::unit_file { 'radsniff.service':
content => template('freeradius/radsniff.service.erb'),
notify => Service['radsniff'],
}
Expand Down
2 changes: 0 additions & 2 deletions manifests/sql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
undef => 3.0,
default => $pool_connect_timeout,
}

} else {
if $pool_connect_timeout != undef {
fail(@("FAIL"/L)
Expand All @@ -85,7 +84,6 @@
}
}


# Determine default location of query file
$queryfile = "${fr_basepath}/sql/queries.conf"

Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"version_requirement": ">=4.0.0 <7.0.0"
}
],
"pdk-version": "2.4.0",
"template-url": "pdk-default#2.4.0",
"template-ref": "tags/2.4.0-0-gfa6b6d2"
"pdk-version": "2.6.1",
"template-url": "pdk-default#2.7.1",
"template-ref": "tags/2.7.1-0-g9a16c87"
}

0 comments on commit 54a728c

Please sign in to comment.