Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9033

Confirm and describe type-specific behavior when omitting the ensure attribute

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docs
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide
      • The default behavior of omitting the ensure attribute is either described in every type, or is confirmed to be clearly described in the type reference preamble.
      • For all types that override the default behavior when ensure is omitted, the ensure attribute's documentation is expanded to describe this exceptional behavior.
      Show
      The default behavior of omitting the ensure attribute is either described in every type, or is confirmed to be clearly described in the type reference preamble. For all types that override the default behavior when ensure is omitted, the ensure attribute's documentation is expanded to describe this exceptional behavior.
    • Team:
      Coremunity
    • QA Risk Assessment:
      Needs Assessment

      Description

      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, 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.

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              garrett.guillotte Garrett Guillotte
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support