Skip to content

Support notdefaultfor provider DSL method #282

Description

@joshcooper

Use Case

Puppet added a notdefaultfor DSL method to constrain providers, similar to defaultfor. This allows providers to default to a given osfamily, except on earlier os versions. However, strings doesn't support notdefaultfor

Describe the Solution You Would Like

Strings should emit documentation when a provider uses notdefaultfor. For example, the systemd service provider defines:

  defaultfor :operatingsystem => :debian
  notdefaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["5", "6", "7"] 

I would expect to see documentation similar to defaultfor in the docs for each provider:

<div class="tags">
  <p class="tag_title">Default Provider For</p>
  <ul>

  
    
      <li><tt>osfamily &mdash; [:archlinux]</tt></li>
    
      <li><tt>osfamily &mdash; redhat, operatingsystemmajrelease &mdash; ["7", "8"]</tt></li>
    ```
See also https://tickets.puppetlabs.com/browse/PUP-8552

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions