Skip to content

Conversation

jcpunk
Copy link
Contributor

@jcpunk jcpunk commented Nov 23, 2020

Pull Request (PR) description

It seems every module has a different way of putting the This is a puppet managed file don't edit it in their templates. They are all a bit different and each one says slightly different things. This is my attempt to get something a bit more unified in place so folks can have greater consistency in their modules.

@jcpunk jcpunk force-pushed the header branch 2 times, most recently from 1cdb715 to 253f382 Compare November 23, 2020 17:18
}
```

### EPP Templates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to see a native puppet function that takes all these parameters. Something like

extlib::puppet_managed(String $message = 'WARNING This file is managed by puppet. Do not edit!',
                                         String  $begin_line = '#',
                                         String  $end_line = '',
                                         Int     $line_length = 70,
                                         String  $metadata_title = 'Metadata:',
                                         Hash    $metadata = {} ) >> String {

}

# process content here and break into multiple lines

Then in the template it would be

<%= extlib::puppet_managed() %>

Int $line_length = 70,
String $metadata_title = 'Metadata:',
Hash $metadata = {}
| -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is complex and too many tags to understand. Would prefer to have the logic in the function.

@vox-pupuli-tasks
Copy link

Dear @jcpunk, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants