Force json output format for hiera in derive pci whitelist

For some reason, after queens to train FFU, when drive pci
whitelist is executed, the hiera output is shown with the
default output format 'ruby' (with => instead of :). This
results in json parsing error. Force the output to be json
which will work for regular and the ffu cases.

Change-Id: I065ec0e7ae14530f6bf4f6fe356e885ba2b30d7f
(cherry picked from commit 8a79c1b635)
This commit is contained in:
Saravanan KR 2021-01-12 16:37:54 +05:30
parent bbf0354a65
commit cb8e846eaa
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ def get_pci_passthrough_whitelist(user_config, pf, pci_addresses,
def user_passthrough_config():
try:
out, err = processutils.execute(
'hiera', '-c', '/etc/puppet/hiera.yaml',
'hiera', '-f', 'json', '-c', '/etc/puppet/hiera.yaml',
_PASSTHROUGH_WHITELIST_KEY
)
if not err: