From 9def9882279e575faa21d1f8c6646fd25cf67240 Mon Sep 17 00:00:00 2001 From: Denis Egorenko Date: Tue, 1 Nov 2016 18:01:41 +0300 Subject: [PATCH] Use proper murano package backend in openrc Use only 'glare' as package backend, because 'glance' is deprecated. Also leave backward compatibility with 'glance' on removing it from openrc file in case of changing package backend. Change-Id: I9182d62897d3f214d7d2b45e22de2d97031e0984 Closes-bug: #1638296 --- deployment_scripts/manifests/update_openrc.pp | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/deployment_scripts/manifests/update_openrc.pp b/deployment_scripts/manifests/update_openrc.pp index 85dc09b..91be4b7 100644 --- a/deployment_scripts/manifests/update_openrc.pp +++ b/deployment_scripts/manifests/update_openrc.pp @@ -31,41 +31,47 @@ file_line { "murano_repo_url ${service_user_name}": if has_key($murano_plugins, 'glance_artifacts_plugin') and $murano_plugins['glance_artifacts_plugin']['enabled'] { file_line { 'murano_glare_plugin root': - line => "export MURANO_PACKAGES_SERVICE='glance'", + line => "export MURANO_PACKAGES_SERVICE='glare'", match => '^export\ MURANO_PACKAGES_SERVICE\=', path => '/root/openrc', } file_line { "murano_glare_plugin ${operator_user_name}": - line => "export MURANO_PACKAGES_SERVICE='glance'", + line => "export MURANO_PACKAGES_SERVICE='glare'", match => '^export\ MURANO_PACKAGES_SERVICE\=', path => "${operator_user_homedir}/openrc", } file_line { "murano_glare_plugin ${service_user_name}": - line => "export MURANO_PACKAGES_SERVICE='glance'", + line => "export MURANO_PACKAGES_SERVICE='glare'", match => '^export\ MURANO_PACKAGES_SERVICE\=', path => "${service_user_homedir}/openrc", } } else { file_line { 'murano_glare_plugin': - ensure => absent, - line => "export MURANO_PACKAGES_SERVICE='glance'", - match => '^export\ MURANO_PACKAGES_SERVICE\=', - path => '/root/openrc', + ensure => absent, + line => "export MURANO_PACKAGES_SERVICE=", + replace => false, + match => "^export\ MURANO_PACKAGES_SERVICE\='(glance|glare)'", + match_for_absence => true, + path => '/root/openrc', } file_line { "murano_glare_plugin ${operator_user_name}": - ensure => absent, - line => "export MURANO_PACKAGES_SERVICE='glance'", - match => '^export\ MURANO_PACKAGES_SERVICE\=', - path => "${operator_user_homedir}/openrc", + ensure => absent, + line => "export MURANO_PACKAGES_SERVICE=", + replace => false, + match => "^export\ MURANO_PACKAGES_SERVICE\='(glance|glare)'", + match_for_absence => true, + path => "${operator_user_homedir}/openrc", } file_line { "murano_glare_plugin ${service_user_name}": - ensure => absent, - line => "export MURANO_PACKAGES_SERVICE='glance'", - match => '^export\ MURANO_PACKAGES_SERVICE\=', - path => "${service_user_homedir}/openrc", + ensure => absent, + line => "export MURANO_PACKAGES_SERVICE=", + replace => false, + match => "^export\ MURANO_PACKAGES_SERVICE\='(glance|glare)'", + match_for_absence => true, + path => "${service_user_homedir}/openrc", } }