From ff2bcbbf4bcf2ce4a8d6e7b189b3e3db5849f88d Mon Sep 17 00:00:00 2001 From: Christopher Aedo Date: Sun, 26 Jul 2015 20:18:24 -0700 Subject: [PATCH] Generate assets file from assets.yaml This commit modifies the puppet manifest to generate a JSON file from the contents of the assets.yaml file. This is necessary as the multiple YAML files are now combined into a single YAML file. Change-Id: Ib8211b1f0a00e2d9098c7c0eb0624781fdb212d3 --- manifests/init.pp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c119e3d..325d49a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,26 +44,19 @@ class apps_site ( } } - exec { 'make_glance_json' : - command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/glance_images.yaml > ${root_dir}/openstack_catalog/web/static/glance_images.json", + file { "${root_dir}/openstack_catalog/web/api": + ensure => directory, + } + + file { "${root_dir}/openstack_catalog/web/api/v1": + ensure => directory, + } + + exec { 'make_assets_json' : + command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/assets.yaml > ${root_dir}/openstack_catalog/web/api/v1/assets", path => '/usr/local/bin:/usr/bin:/bin', refreshonly => true, subscribe => Vcsrepo[$root_dir], } - exec { 'make_heat_json' : - command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/heat_templates.yaml > ${root_dir}/openstack_catalog/web/static/heat_templates.json", - path => '/usr/local/bin:/usr/bin:/bin', - refreshonly => true, - subscribe => Vcsrepo[$root_dir], - } - - exec { 'make_murano_json' : - command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/murano_apps.yaml > ${root_dir}/openstack_catalog/web/static/murano_apps.json", - path => '/usr/local/bin:/usr/bin:/bin', - refreshonly => true, - subscribe => Vcsrepo[$root_dir], - } - - }