Skip to content

Commit

Permalink
Merge pull request #263 from puppetlabs/pdksync_maint/pdk_update_20-04
Browse files Browse the repository at this point in the history
pdksync - (Maint) PDK Update
  • Loading branch information
LukasAud authored May 5, 2022
2 parents e9c72ef + 0442cdc commit 06d6a5c
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
# Optional Input
channel: '#team-ia-bots'
channel: '#team-cat-bots'
name: 'GABot'
7 changes: 7 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
--relative
--no-parameter_types-check
--no-parameter_documentation-check
--no-top_scope_facts-check
--no-legacy_facts-check
--no-relative_classname_inclusion-check
--no-unquoted_string_in_selector-check
--no-unquoted_string_in_case-check
9 changes: 9 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ spec/spec_helper.rb:
unmanaged: false
.travis.yml:
delete: true
Rakefile:
extra_disabled_lint_checks:
- parameter_types
- parameter_documentation
- top_scope_facts
- legacy_facts
- relative_classname_inclusion
- unquoted_string_in_selector
- unquoted_string_in_case
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def changelog_future_release
end

PuppetLint.configuration.send('disable_relative')
PuppetLint.configuration.send('disable_parameter_types')
PuppetLint.configuration.send('disable_parameter_documentation')
PuppetLint.configuration.send('disable_top_scope_facts')
PuppetLint.configuration.send('disable_legacy_facts')
PuppetLint.configuration.send('disable_relative_classname_inclusion')
PuppetLint.configuration.send('disable_unquoted_string_in_selector')
PuppetLint.configuration.send('disable_unquoted_string_in_case')


if Bundler.rubygems.find_name('github_changelog_generator').any?
Expand Down
4 changes: 2 additions & 2 deletions examples/compliance_example.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
notify { 'compliance_example_mode_info':
message => 'Switch to audit mode using
\$env:FACTER_REGISTRY_COMPLIANCE_EXAMPLE_MODE = \'audit\'',
before => Notify['compliance_example_mode']
before => Notify['compliance_example_mode'],
}
}
}
Expand All @@ -41,7 +41,7 @@
Registry_key {
ensure => $mode ? {
setup => present,
default => undef
default => undef,
},
purge_values => $mode ? {
setup => true,
Expand Down
2 changes: 1 addition & 1 deletion examples/purge_example.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
registry_value { "${key_path}\\Value4":
ensure => present,
type => array,
data => [ 'one', 'two', 'three' ],
data => ['one', 'two', 'three'],
}
registry_value { "${key_path}\\Value5":
ensure => present,
Expand Down
6 changes: 3 additions & 3 deletions examples/registry_examples.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@
registry_value { 'HKLM\Software\Vendor\Bar\valuearray1':
ensure => present,
type => array,
data => [ 'one', 'two', 'three' ],
data => ['one', 'two', 'three'],
}

$some_string = 'somestring'
registry_value { 'HKLM\Software\Vendor\Bar\valuearray2':
ensure => present,
type => array,
data => [ 0, 'zero', '0', 123456, 'two', $some_string ],
data => [0, 'zero', '0', 123456, 'two', $some_string],
}

$some_array = [ 'array1', 'array2', 'array3' ]
$some_array = ['array1', 'array2', 'array3']
registry_value { 'HKLM\Software\Vendor\Bar\valuearray3':
ensure => present,
type => array,
Expand Down
6 changes: 2 additions & 4 deletions examples/service_example.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@
# Define a new service named "Puppet Test" that is disabled.
registry::service { 'PuppetExample1':
display_name => 'Puppet Example 1',
description =>
'This is a simple example managing the
description => 'This is a simple example managing the
registry entries for a Windows Service',
command => 'C:\PuppetExample1.bat',
start => 'disabled',
}
registry::service { 'PuppetExample2':
display_name => 'Puppet Example 2',
description =>
'This is a simple example
description => 'This is a simple example
managing the registry entries for a Windows Service',
command => 'C:\PuppetExample2.bat',
start => 'disabled',
Expand Down
3 changes: 1 addition & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@
# command => 'C:\PuppetLabs\Puppet\service\daemon.bat',
# }
#
define registry::service(
define registry::service (
$ensure = 'UNSET',
$display_name = 'UNSET',
$description = 'UNSET',
$command = 'UNSET',
$start = 'UNSET'
) {

$ensure_real = $ensure ? {
'UNSET' => present,
undef => present,
Expand Down
15 changes: 7 additions & 8 deletions manifests/value.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@
# }
#
define registry::value (
Pattern[/^\w+/] $key,
Optional[String] $value = undef,
Optional[Pattern[/^\w+/]] $type = 'string',
Pattern[/^\w+/] $key,
Optional[String] $value = undef,
Pattern[/^\w+/] $type = 'string',
Optional[Variant[
String,
Numeric,
Array[String]
]] $data = undef,
String,
Numeric,
Array[String]
]] $data = undef,
) {

# ensure windows os
if $::operatingsystem != 'windows' {
fail("Unsupported OS ${::operatingsystem}")
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
],
"description": "This module provides a native type and provider to manage keys and values in the Windows Registry",
"pdk-version": "2.3.0",
"pdk-version": "2.4.0",
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
"template-ref": "heads/main-0-gf3911d3"
"template-ref": "2.5.0-0-g806810b"
}

0 comments on commit 06d6a5c

Please sign in to comment.