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
This commit is contained in:
parent
8c592d56b5
commit
75b0b3d3b6
|
@ -5,7 +5,7 @@
|
||||||
# == Parameters:
|
# == Parameters:
|
||||||
#
|
#
|
||||||
# [*policy_path*]
|
# [*policy_path*]
|
||||||
# (Optional) Path to the policy file
|
# (Optional) Path to the policy file. This should be an asbolute path.
|
||||||
# Defaults to $name
|
# Defaults to $name
|
||||||
#
|
#
|
||||||
# [*policies*]
|
# [*policies*]
|
||||||
|
@ -43,6 +43,7 @@ define openstacklib::policy (
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) {
|
) {
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $policy_path)
|
||||||
|
|
||||||
if empty($policies) {
|
if empty($policies) {
|
||||||
create_resources('openstacklib::policy::default', { $policy_path => {
|
create_resources('openstacklib::policy::default', { $policy_path => {
|
||||||
|
|
Loading…
Reference in New Issue