-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
allow Sensitive type for content param #115
Conversation
Systemd::Dropin $filename = $name, | ||
Enum['present', 'absent', 'file'] $ensure = 'present', | ||
Stdlib::Absolutepath $path = '/etc/systemd/system', | ||
Optional[Variant[String,Sensitive[String]]] $content = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be clearer to make that a Variant[String,Sensitive[String],Undef]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raphink hm IMHO Optional
is the more idomatic way. Also grepping over a couple of modules i have checked out here from various sources it seems Optional[Variant]
is what is usually used:
$ find . -name "*.pp" |xargs grep -E "Variant.*Undef" | wc -l
40
$ find . -name "*.pp" |xargs grep -E "Optional\[Variant" | wc -l
492
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I go with @TheMeier here. The default should be undef
and that requires the type to be Optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastelfreak technically it doesn't require to use Optional
, as a variant allowing Undef
works as well.
I think it should be |
modulesync 2.0.0
fixes #114