Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow hiera driven transport/virtual/hash/conffile #296

Merged
merged 2 commits into from
Oct 3, 2021

Conversation

cringdahl
Copy link

  • add more create_resources in init.pp
  • remove overt init->hash requirement

Copy link
Member

@ghoneycutt ghoneycutt left a comment

Choose a reason for hiding this comment

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

These will need spec tests added. Here is an example at https://github.com/voxpupuli/puppet-postfix/blob/master/spec/classes/postfix_spec.rb#L468

A simpler set of tests would be for each of these additions, you give a param with data and check that postfix::XYZ { 'data': } resource is present.

Here's an example of similar code at https://github.com/sensu/sensu-puppet/blob/master/manifests/resources.pp which is iterating over the hash instead of create_resources() and is the new way to do things. You dont need to adopt that here as there is existing code that you are matching. Example spec tests at https://github.com/sensu/sensu-puppet/blob/master/spec/classes/resources_spec.rb

manifests/init.pp Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
manifests/hash.pp Show resolved Hide resolved
@ghoneycutt
Copy link
Member

@cringdahl Thanks for the contribution!

@cringdahl
Copy link
Author

Thanks for the pointers and the New Way example link. Much appreciated.

@ghoneycutt
Copy link
Member

@cringdahl Awesome work! Could you please rebase and squash your commits into one and I'll merge this.

@cringdahl
Copy link
Author

@cringdahl Awesome work! Could you please rebase and squash your commits into one and I'll merge this.

hey, @ghoneycutt , just a quick ping to get this merged in, thanks

@ghoneycutt ghoneycutt added enhancement New feature or request and removed needs tests labels Oct 3, 2021
@ghoneycutt ghoneycutt merged commit 1e7ba25 into voxpupuli:master Oct 3, 2021
@cringdahl cringdahl deleted the more_create_resources branch October 13, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants