Fix hiera overrides for 8.0
This change updates how we add our hiera override to support the hiera.yaml format change in 8.0 Change-Id: Ic2e620b5402c2fcd80bfe022c78d4fe800a5d568 Related-Bug: #1526502
This commit is contained in:
parent
73d541228d
commit
14aa54ba9c
|
@ -153,10 +153,21 @@ amqp_hosts: <%= @amqp_hosts %>
|
||||||
ensure => 'installed',
|
ensure => 'installed',
|
||||||
}
|
}
|
||||||
|
|
||||||
file_line {"${plugin_name}_hiera_override":
|
# hiera file changes between 7.0 and 8.0 so we need to handle the override the
|
||||||
path => '/etc/hiera.yaml',
|
# different yaml formats via these exec hacks. It should be noted that the
|
||||||
line => " - override/${plugin_name}",
|
# fuel hiera task will wipe out these this update to the hiera.yaml
|
||||||
after => ' - override/module/%{calling_module}',
|
exec { "${plugin_name}_hiera_override_7.0":
|
||||||
|
command => "sed '/ - override\/plugins/a\ - override\/${plugin_name}' /etc/hiera.yaml",
|
||||||
|
path => '/bin:/usr/bin',
|
||||||
|
unless => "grep -q '^ - override/${plugin_name}' /etc/hiera.yaml",
|
||||||
|
onlyif => 'grep -q "^ - override/plugins" /etc/hiera.yaml'
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { "${plugin_name}_hiera_override_8.0":
|
||||||
|
command => "sed '/ - override\/plugins/a\ - override\/${plugin_name}' /etc/hiera.yaml",
|
||||||
|
path => '/bin:/usr/bin',
|
||||||
|
unless => "grep -q '^ - override/${plugin_name}' /etc/hiera.yaml",
|
||||||
|
onlyif => 'grep -q "^ - override/plugins" /etc/hiera.yaml'
|
||||||
}
|
}
|
||||||
|
|
||||||
#FIXME(mattymo): https://bugs.launchpad.net/fuel/+bug/1479317
|
#FIXME(mattymo): https://bugs.launchpad.net/fuel/+bug/1479317
|
||||||
|
|
Loading…
Reference in New Issue