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

allow Sensitive type for content param #115

Merged
merged 1 commit into from
Jul 15, 2019
Merged

Conversation

TheMeier
Copy link
Contributor

fixes #114

Systemd::Dropin $filename = $name,
Enum['present', 'absent', 'file'] $ensure = 'present',
Stdlib::Absolutepath $path = '/etc/systemd/system',
Optional[Variant[String,Sensitive[String]]] $content = undef,
Copy link
Member

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]

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Member

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.

@raphink raphink merged commit f0ce6f0 into voxpupuli:master Jul 15, 2019
@vchepkov
Copy link
Contributor

I think it should be Optional[Variant[String,Sensitive]]
Sensitive is type on it's own

@raphink raphink added the enhancement New feature or request label Aug 21, 2020
simondeziel pushed a commit to simondeziel/puppet-systemd that referenced this pull request Jun 16, 2021
simondeziel pushed a commit to simondeziel/puppet-systemd that referenced this pull request Jun 16, 2021
op-ct pushed a commit to op-ct/puppet-systemd that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Sensitive type for systemd::dropin_file::content
4 participants