From 847ba9777190f090e6da467d38827b0736550fa2 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Wed, 3 Feb 2016 19:14:24 +0300 Subject: [PATCH] Use hiera/plugins directory instead of override hiera task now precreates an entry in /etc/hiera.yaml for all plugins so that it is no longer necessary to inject an override entry. Change-Id: I90e20520420182f412e7062c423d608f41db2c99 Partial-Bug: #1540388 --- deployment_scripts/database_hiera_override.pp | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/deployment_scripts/database_hiera_override.pp b/deployment_scripts/database_hiera_override.pp index b33e015..293ba7b 100644 --- a/deployment_scripts/database_hiera_override.pp +++ b/deployment_scripts/database_hiera_override.pp @@ -1,7 +1,7 @@ notice('MODULAR: detach-database/database_hiera_override.pp') $detach_database_plugin = hiera('detach-database', undef) -$hiera_dir = '/etc/hiera/override' +$hiera_dir = '/etc/hiera/plugins' $plugin_name = 'detach-database' $plugin_yaml = "${plugin_name}.yaml" @@ -114,22 +114,4 @@ deploy_vrouter: <%= @deploy_vrouter %> package {'ruby-deep-merge': ensure => 'installed', } - - # hiera file changes between 7.0 and 8.0 so we need to handle the override the - # different yaml formats via these exec hacks. It should be noted that the - # fuel hiera task will wipe out these this update to the hiera.yaml - exec { "${plugin_name}_hiera_override_7.0": - command => "sed -i '/ - 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 -i '/ - 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' - } - }