diff --git a/.devcontainer/README.md b/.devcontainer/README.md index cc4675e..a719361 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -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": [], diff --git a/.rubocop.yml b/.rubocop.yml index 8f782e7..31e8248 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,7 @@ require: - rubocop-rspec AllCops: DisplayCopNames: true - TargetRubyVersion: '2.4' + TargetRubyVersion: '2.5' Include: - "**/*.rb" Exclude: diff --git a/Gemfile b/Gemfile index a167b88..fc28658 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ group :development do 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 "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false end group :system_tests do gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby] diff --git a/manifests/init.pp b/manifests/init.pp index 56b955e..8d93808 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -124,15 +124,13 @@ Optional[String] $afs_cell = undef, Stdlib::Unixpath $afs_config_path = undef, Optional[String] $afs_cron_job_content = undef, - Optional[Enum['hourly', 'daily', 'weekly', 'monthly', 'specific']] - $afs_cron_job_interval = undef, - Optional[Integer[0, 59]] $afs_cron_job_minute = 42, + Optional[Enum['hourly', 'daily', 'weekly', 'monthly', 'specific']] $afs_cron_job_interval = undef, + Integer[0, 59] $afs_cron_job_minute = 42, Optional[Integer[0, 23]] $afs_cron_job_hour = undef, Optional[Integer[1, 31]] $afs_cron_job_monthday = undef, Optional[Integer[1, 12]] $afs_cron_job_month = undef, Optional[Integer[0, 7]] $afs_cron_job_weekday = undef, - Variant[Array[String], String] - $afs_suidcells = [], + Variant[Array[String], String] $afs_suidcells = [], Stdlib::Unixpath $cache_path = undef, Integer $cache_size = 1000000, String $config_client_args = '-dynroot -afsdb -daemons 6 -volumes 1000', @@ -141,19 +139,17 @@ Stdlib::Unixpath $config_client_path = undef, Boolean $config_client_update = false, Boolean $create_symlinks = false, - Optional[Hash] $links = {}, + Hash $links = {}, Stdlib::Unixpath $init_script = '/etc/init.d/openafs-client', Optional[String] $init_template = undef, Optional[String] $systemd_script_template = undef, Optional[String] $systemd_unit_template = undef, Optional[String] $package_adminfile = undef, - Variant[Array[String], String] - $package_name = undef, + Variant[Array[String], String] $package_name = undef, Optional[String] $package_provider = undef, Optional[String] $package_source = undef, Optional[String] $service_provider = undef, ) { - $afs_suidcells_array = any2array($afs_suidcells) $config_client_dir = dirname($config_client_path) @@ -271,7 +267,7 @@ path => '/etc/modprobe.d/10-unsupported-modules.conf', line => 'allow_unsupported_modules 1', match => '^allow_unsupported_modules 0$', - before => Service[afs_openafs_client_service], + before => 'Service[afs_openafs_client_service]', } } @@ -366,7 +362,6 @@ # Solaris containers must not start the service nor add setserverprefs cronjob. if $solaris_container == false { - # THIS SERVICE SHOULD NOT BE RESTARTED # Restarting it may cause AFS module and kernel problems. service { 'afs_openafs_client_service': @@ -409,7 +404,6 @@ } if $create_symlinks == true { - $afs_create_link_defaults = { 'ensure' => 'link', 'owner' => 'root', @@ -418,7 +412,5 @@ } create_resources(file, $links, $afs_create_link_defaults) - } - } diff --git a/manifests/validate_domain_names.pp b/manifests/validate_domain_names.pp index c7ce61f..74b4a6b 100644 --- a/manifests/validate_domain_names.pp +++ b/manifests/validate_domain_names.pp @@ -1,8 +1,6 @@ # == Define: afs::validate_domain_names # iteration in Puppet 3 style # -define afs::validate_domain_names{ - +define afs::validate_domain_names { validate_domain_name($name) - } diff --git a/metadata.json b/metadata.json index 15ca09a..04930b1 100644 --- a/metadata.json +++ b/metadata.json @@ -102,7 +102,7 @@ "version_requirement": ">= 5.0.0 < 8.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.5.0", + "template-url": "pdk-default#2.5.0", + "template-ref": "tags/2.5.0-0-g369d483" }