Skip to content

Commit

Permalink
Merge pull request #75 from ekohl/beaker-hiera-v5
Browse files Browse the repository at this point in the history
Use beaker-hiera 1.x with hiera.yaml version 5
  • Loading branch information
bastelfreak authored Nov 21, 2023
2 parents a6afa83 + 650b642 commit e6375b9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,22 @@ RSpec.configure do |c|
c.suite_hiera = true
c.suite_hiera_data_dir = File.join('spec', 'acceptance', 'hieradata')
c.suite_hiera_hierachy = [
'fqdn/%{fqdn}.yaml',
'os/%{os.family}/%{os.release.major}.yaml',
'os/%{os.family}.yaml',
'common.yaml',
{
name: "Per-node data",
path: 'fqdn/%{facts.networking.fqdn}.yaml',
},
{
name: 'OS family version data',
path: 'family/%{facts.os.family}/%{facts.os.release.major}.yaml',
},
{
name: 'OS family data',
path: 'family/%{facts.os.family}.yaml',
},
{
name: 'Common data',
path: 'common.yaml',
},
]
end
```
Expand Down
20 changes: 16 additions & 4 deletions lib/voxpupuli/acceptance/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,22 @@ def configure_beaker(modules: :metadata, &block)
c.add_setting :suite_hiera, default: true
c.add_setting :suite_hiera_data_dir, default: File.join('spec', 'acceptance', 'hieradata')
c.add_setting :suite_hiera_hierachy, default: [
'fqdn/%{networking.fqdn}.yaml',
'os/%{os.family}/%{os.release.major}.yaml',
'os/%{os.family}.yaml',
'common.yaml',
{
name: "Per-node data",
path: 'fqdn/%{facts.networking.fqdn}.yaml',
},
{
name: 'OS family version data',
path: 'family/%{facts.os.family}/%{facts.os.release.major}.yaml',
},
{
name: 'OS family data',
path: 'family/%{facts.os.family}.yaml',
},
{
name: 'Common data',
path: 'common.yaml',
},
]

# Node setup
Expand Down
2 changes: 1 addition & 1 deletion voxpupuli-acceptance.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'bcrypt_pbkdf', '~> 1.1'
s.add_runtime_dependency 'beaker', '>= 4.33', '< 6'
s.add_runtime_dependency 'beaker-docker', '~> 2.1'
s.add_runtime_dependency 'beaker-hiera', '~> 0.4'
s.add_runtime_dependency 'beaker-hiera', '~> 1.0'
s.add_runtime_dependency 'beaker-hostgenerator', '~> 2.2'
s.add_runtime_dependency 'beaker_puppet_helpers', '~> 1.0'
s.add_runtime_dependency 'beaker-rspec', '~> 8.0', '>= 8.0.1'
Expand Down

0 comments on commit e6375b9

Please sign in to comment.