Jira (PUP-9033) Confirm and describe type-specific behavior when omitting the ensure attribute

4 views
Skip to first unread message

Garrett Guillotte (JIRA)

unread,
Aug 1, 2018, 11:01:04 AM8/1/18
to puppe...@googlegroups.com
Garrett Guillotte created an issue
 
Puppet / Improvement PUP-9033
Confirm and describe type-specific behavior when omitting the ensure attribute
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2018/08/01 8:00 AM
Priority: Normal Normal
Reporter: Garrett Guillotte

In types that use the default ensurable logic, the "ensure" property works in implied ways when it is not present. This default behavior is described in our documentation's Type Reference page.

However, this isn't always clear in the individual types' description of the ensure attribute. For example, If a user specifies this below entry in their manifest/site.pp, puppet will not CREATE a file. But if the file exists, puppet will MODIFY the file.

file { 'test entry friendly name' :
  path => '/tmp/testfile',
  content => 'a whole bunch of testy content.'
}

But the file type documentation does not describe the behavior of omitting the attribute.

This is further complicated by types that do not use the default ensurable logic, such as the group type prior to Puppet 5.4.0 (see PUP-7968).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Garrett Guillotte (JIRA)

unread,
Aug 1, 2018, 11:02:11 AM8/1/18
to puppe...@googlegroups.com

Garrett Guillotte (JIRA)

unread,
Aug 1, 2018, 11:08:41 AM8/1/18
to puppe...@googlegroups.com
Garrett Guillotte updated an issue
In types that use the default {{ensurable}} logic, the "ensure" property works in implied ways when it is not present. This default behavior is described in our [documentation's Type Reference page preamble |https://puppet.com/docs/puppet/latest/type.html] , but users also view individual type reference pages, and the modularization of types and providers means its documentation might be visible in multiple places that do not include the preamble .


However, this isn't always clear in the individual types' description of the {{ensure}} attribute. For example, If a user specifies this below entry in their manifest/site.pp, puppet will not CREATE a file. But if the file exists, puppet will MODIFY the file.

{code:puppet}

file { 'test entry friendly name' :
  path => '/tmp/testfile',
  content => 'a whole bunch of testy content.'
}
{code}

But the [file type documentation|https://puppet.com/docs/puppet/5.3/types/file.html#file-attribute-ensure] does not describe the behavior of omitting the attribute.


This is further complicated by types that do not use the default {{ensurable}} logic, such as the {{group}} type prior to Puppet 5.4.0 (see PUP-7968).

Jorie Tappa (JIRA)

unread,
Aug 6, 2018, 5:17:03 PM8/6/18
to puppe...@googlegroups.com
Jorie Tappa commented on Improvement PUP-9033
 
Re: Confirm and describe type-specific behavior when omitting the ensure attribute

Additional discussion is necessary about whether we should unify the behavior in addition to documenting the state of the world

Jorie Tappa (JIRA)

unread,
Sep 10, 2018, 5:07:05 PM9/10/18
to puppe...@googlegroups.com

Garrett Guillotte (Jira)

unread,
Sep 9, 2020, 8:48:04 PM9/9/20
to puppe...@googlegroups.com
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages