Skip to content

Commit

Permalink
Merge pull request #206 from bastelfreak/lint
Browse files Browse the repository at this point in the history
Fix `Optional` datatype for non-optional parameters
  • Loading branch information
bastelfreak committed Jul 27, 2021
2 parents 8751108 + 08dd01a commit cf036c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Default value: `'/etc/systemd/system'`

##### <a name="selinux_ignore_defaults"></a>`selinux_ignore_defaults`

Data type: `Optional[Boolean]`
Data type: `Boolean`

If Puppet should ignore the default SELinux labels.

Expand Down Expand Up @@ -635,7 +635,7 @@ Default value: `'/etc/systemd/system'`

##### <a name="selinux_ignore_defaults"></a>`selinux_ignore_defaults`

Data type: `Optional[Boolean]`
Data type: `Boolean`

If Puppet should ignore the default SELinux labels.

Expand Down Expand Up @@ -929,15 +929,15 @@ Default value: `'/etc/udev/rules.d'`

##### <a name="selinux_ignore_defaults"></a>`selinux_ignore_defaults`

Data type: `Optional[Boolean]`
Data type: `Boolean`

If Puppet should ignore the default SELinux labels.

Default value: ``false``

##### <a name="notify_services"></a>`notify_services`

Data type: `Optional[Variant[Array, String]]`
Data type: `Variant[Array[String[1], String[1]]]`

List of services to notify when this rule is updated

Expand Down Expand Up @@ -998,7 +998,7 @@ Default value: `'/etc/systemd/system'`

##### <a name="content"></a>`content`

Data type: `Optional[String]`
Data type: `Optional[Variant[String, Sensitive[String]]]`

The full content of the unit file

Expand Down
2 changes: 1 addition & 1 deletion manifests/dropin_file.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Systemd::Dropin $filename = $name,
Enum['present', 'absent', 'file'] $ensure = 'present',
Stdlib::Absolutepath $path = '/etc/systemd/system',
Optional[Boolean] $selinux_ignore_defaults = false,
Boolean $selinux_ignore_defaults = false,
Optional[Variant[String,Sensitive[String]]] $content = undef,
Optional[String] $source = undef,
Optional[Stdlib::Absolutepath] $target = undef,
Expand Down
2 changes: 1 addition & 1 deletion manifests/service_limits.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
define systemd::service_limits (
Enum['present', 'absent', 'file'] $ensure = 'present',
Stdlib::Absolutepath $path = '/etc/systemd/system',
Optional[Boolean] $selinux_ignore_defaults = false,
Boolean $selinux_ignore_defaults = false,
Optional[Systemd::ServiceLimits] $limits = undef,
Optional[String] $source = undef,
Boolean $restart_service = true
Expand Down
4 changes: 2 additions & 2 deletions manifests/udev/rule.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
Array $rules,
Enum['present', 'absent', 'file'] $ensure = 'present',
Stdlib::Absolutepath $path = '/etc/udev/rules.d',
Optional[Variant[Array, String]] $notify_services = [],
Optional[Boolean] $selinux_ignore_defaults = false,
Variant[Array[String[1]], String[1]] $notify_services = [],
Boolean $selinux_ignore_defaults = false,
) {
include systemd

Expand Down

0 comments on commit cf036c9

Please sign in to comment.