Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Added files parameter to define resources quickly #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcpunk
Copy link

@jcpunk jcpunk commented May 18, 2016

This patch allows for the creation of tftp::resources via a class parameter - possibly from hiera or an ENC.

@@ -90,4 +92,8 @@
pattern => '/usr/sbin/in.tftpd',
start => $start,
}

if $files {
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to this pattern. All defines should be able to be expressed this way because it allows you to specify hashes in Hiera for that data.

Would suggest that you default to using hiera_hash() so tftp::file can be expressed at multiple levels in Hiera's hierarchy.

Here's an example

https://github.com/ghoneycutt/puppet-module-types/blob/master/manifests/init.pp

@jcpunk jcpunk force-pushed the files-param branch 2 times, most recently from 6f450d7 to 41c4863 Compare June 14, 2016 20:18
@jcpunk
Copy link
Author

jcpunk commented Jun 15, 2016

I looked over the snippet ghoneycutt included and looked over the official puppetlabs modules (to ensure a consistent style) and didn't see hiera_hash in use for any of the Supported puppetlabs modules....

@ghoneycutt
Copy link
Contributor

I use it in ghoneycutt/pam which is an approved module. Without the hiera_hash() lookup, the functionality you added will not work if you need to specify data at multiple levels in the hierarchy.

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2021

CLA assistant check
All committers have signed the CLA.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants