Add a type for ensure on service resources#750
Conversation
|
Would ServiceEnsure or EnsureService be easier to read? |
|
Only first character uppercase, for consistency with existing types (f.e:
|
|
A third option is |
| @@ -0,0 +1 @@ | |||
| type Stdlib::Serviceensure = Enum['stopped', 'running'] | |||
There was a problem hiding this comment.
should this not be
type Stdlib::Serviceensure = Varient[Boolean,Enum['stopped', 'running']]There was a problem hiding this comment.
IMO, using ensure => true or ensure => false on a service is an anti-pattern. It works but it's just not as clear to new users what is going on. As a convention I don't support it.
There was a problem hiding this comment.
I tend to agree with you however if this is going into stdlib then i think it should conform to the documentation
https://puppet.com/docs/puppet/5.3/type.html#service-attribute-ensure
|
Add the needed docs change and I will merge. |
|
@npwalker Moving towards a clean release on this module to allow a full rubocop run, so would love to get this in before that. Please add the docs so I can do o, otherwise a full-rebase will be needed. |
bb1a971 to
ec2c517
Compare
|
@david22swan okay updated. |
No description provided.