From dc3e416cd7ee0e8c00021abbf27f8787a3850046 Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Tue, 24 Nov 2015 17:14:58 +0100 Subject: [PATCH] Add symlink to support hiera >= 3.0 Hiera versions >= 3.0 change the default hiera.yaml file, by using "common.yaml" for the default hieradata file instead of "defaults.yaml", as used before. Adding a symlink to support both versions. Change-Id: I074945fecea067dbb360ef252e07e87c90a4d390 Fixes: bz#1284978 --- packstack/modules/ospluginutils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packstack/modules/ospluginutils.py b/packstack/modules/ospluginutils.py index 8c16b0d32..a7bcc8dd3 100644 --- a/packstack/modules/ospluginutils.py +++ b/packstack/modules/ospluginutils.py @@ -25,6 +25,8 @@ controller = Controller() PUPPET_DIR = os.path.join(basedefs.DIR_PROJECT_DIR, "puppet") PUPPET_TEMPLATE_DIR = os.path.join(PUPPET_DIR, "templates") HIERA_DEFAULTS_YAML = os.path.join(basedefs.HIERADATA_DIR, "defaults.yaml") +# For compatibility with hiera >= 3.0 +HIERA_COMMON_YAML = os.path.join(basedefs.HIERADATA_DIR, "common.yaml") class ManifestFiles(object): @@ -80,6 +82,7 @@ def generateHieraDataFile(): outfile.write(yaml.dump(controller.CONF, explicit_start=True, default_flow_style=False)) + os.symlink(HIERA_DEFAULTS_YAML, HIERA_COMMON_YAML) def createFirewallResources(hiera_key, default_value='{}'):