-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Hiera5 #194
Hiera5 #194
Conversation
naeem98
commented
May 10, 2017
- Added epp for hiera 5
- Added hiera_version, hiera5_defaults and hierarchy (Array[Hash]) for hiera5
- hiera_version defaults to version 3
- Added custom types for hiera5_defaults and hierarchy for hiera 5
README.md
Outdated
], | ||
} | ||
``` | ||
# Note: For Hiera version 5 when calling the class, please remember to pass '5' to 'hiera_version' as in the example above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit huge. Maybe we should only make it bold?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to bold
$ruby_gpg_name = 'ruby_gpg', | ||
$ruby_gpg_version = undef, | ||
$ruby_gpg_source = undef, | ||
Variant[Array, Array[Hash]] $hierarchy = $::hiera::params::hierarchy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Datatypes \o/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
manifests/init.pp
Outdated
|
||
# Determine hiera version | ||
case $hiera_version { | ||
'5': { if $hierarchy !~ Hiera::Hiera5_hierarchy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a but much whitespace beforethe initla {, can you reformat this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed extra white spaces
@@ -0,0 +1,73 @@ | |||
<%- | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a huge template. Can you add some sort of tests for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrote some tests. Please take a look and let me know if you think that we should more tests.
spec/classes/hiera_spec.rb
Outdated
context 'hiera version 5' do | ||
let (:facts) do | ||
{ | ||
puppetversion: Puppet.version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you migrate this to rspec-puppet-facts? An example is available at: https://github.com/voxpupuli/puppet-zabbix/blob/master/spec/classes/database_mysql_spec.rb#L8-L12
Feel free to join our IRC channel #voxpupuli on freenode if you've any questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with rspec-puppet-facts. It looks good now.
You can fix probably most of the rubocop errors with: bundle exec rubocop -c .rubocop.yml -D -S -a |