From 75b0b3d3b679c1e4e6423f9199abf47ba04e7981 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 20 Oct 2021 17:39:13 +0900 Subject: [PATCH] policy: Make sure policy_path is an absolute path The policy_path parameter should be an absolute path because now this parameter is used to manage the policy file content. Change-Id: Ib2d41f57ab50ef225887bcad2457ffcc0911cd84 --- manifests/policy.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/policy.pp b/manifests/policy.pp index f7b11423..47b79893 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -5,7 +5,7 @@ # == Parameters: # # [*policy_path*] -# (Optional) Path to the policy file +# (Optional) Path to the policy file. This should be an asbolute path. # Defaults to $name # # [*policies*] @@ -43,6 +43,7 @@ define openstacklib::policy ( $purge_config = false, ) { validate_legacy(Hash, 'validate_hash', $policies) + validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $policy_path) if empty($policies) { create_resources('openstacklib::policy::default', { $policy_path => {