Make check_hieradata not fail on empty values of ceph::profile::params::osds
Previously the check would stop the deployment if the hieradata was set even if valued to empty hash or string. This patch changes the check so that it will pass if the hieradata is found but set to empty values. Closes-Bug: 1893066 Change-Id: I183731c81fe5ea40f32f82c48f7053eae6eaed1e
This commit is contained in:
parent
fb05b48550
commit
84755aaba8
|
@ -34,11 +34,11 @@ workflows:
|
||||||
collect_puppet_hieradata:
|
collect_puppet_hieradata:
|
||||||
on-success: check_hieradata
|
on-success: check_hieradata
|
||||||
publish:
|
publish:
|
||||||
hieradata: <% env().get('role_merged_configs', {}).values().select($.keys()).flatten().select(regex('^ceph::profile::params::osds$').search($)).where($ != null).toSet() %>
|
hieradata: <% env().get('role_merged_configs', {}).values().where($ != null).where($.get('ceph::profile::params::osds')).first({}).get('ceph::profile::params::osds', {}) %>
|
||||||
check_hieradata:
|
check_hieradata:
|
||||||
on-success:
|
on-success:
|
||||||
- set_blacklisted_ips: <% not bool($.hieradata) %>
|
- set_blacklisted_ips: <% not bool($.hieradata) %>
|
||||||
- fail(msg=<% 'Ceph deployment stopped, puppet-ceph hieradata found. Convert it into ceph-ansible variables. {0}'.format($.hieradata) %>): <% bool($.hieradata) %>
|
- fail(msg=<% 'Ceph deployment stopped, puppet-ceph hieradata found for ceph::profile::params::osds. Convert it to ceph-ansible variables. {0}'.format($.hieradata) %>): <% bool($.hieradata) %>
|
||||||
set_blacklisted_ips:
|
set_blacklisted_ips:
|
||||||
publish:
|
publish:
|
||||||
blacklisted_ips: <% env().get('blacklisted_ip_addresses', []) %>
|
blacklisted_ips: <% env().get('blacklisted_ip_addresses', []) %>
|
||||||
|
|
Loading…
Reference in New Issue