Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add types in sudo::conf #306

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,47 +460,47 @@ The following parameters are available in the `sudo::conf` defined type:

##### <a name="-sudo--conf--ensure"></a>`ensure`

Data type: `Any`
Data type: `Enum['present', 'absent']`

Ensure if present or absent

Default value: `present`

##### <a name="-sudo--conf--priority"></a>`priority`

Data type: `Any`
Data type: `Integer[0]`

Prefix file name with $priority

Default value: `10`

##### <a name="-sudo--conf--content"></a>`content`

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

Content of configuration snippet

Default value: `undef`

##### <a name="-sudo--conf--source"></a>`source`

Data type: `Any`
Data type: `Optional[String[1]]`

Source of configuration snippet

Default value: `undef`

##### <a name="-sudo--conf--template"></a>`template`

Data type: `Any`
Data type: `Optional[String[1]]`

Path of a template file

Default value: `undef`

##### <a name="-sudo--conf--sudo_config_dir"></a>`sudo_config_dir`

Data type: `Any`
Data type: `Optional[String[1]]`

Where to place configuration snippets.
Only set this, if your platform is not supported or
Expand All @@ -510,15 +510,15 @@ Default value: `undef`

##### <a name="-sudo--conf--sudo_file_name"></a>`sudo_file_name`

Data type: `Any`
Data type: `Optional[String[1]]`

Set a custom file name for the snippet

Default value: `undef`

##### <a name="-sudo--conf--sudo_syntax_path"></a>`sudo_syntax_path`

Data type: `Any`
Data type: `String[1]`

Path to use for executing the sudo syntax check

Expand Down
16 changes: 8 additions & 8 deletions manifests/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
# }
#
define sudo::conf (
$ensure = present,
$priority = 10,
$content = undef,
$source = undef,
$template = undef,
$sudo_config_dir = undef,
$sudo_file_name = undef,
$sudo_syntax_path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Enum['present', 'absent'] $ensure = present,
Integer[0] $priority = 10,
Optional[Variant[Array[String[1]], String[1]]] $content = undef,
Optional[String[1]] $source = undef,
Optional[String[1]] $template = undef,
Optional[String[1]] $sudo_config_dir = undef,
Optional[String[1]] $sudo_file_name = undef,
String[1] $sudo_syntax_path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
) {
include sudo

Expand Down