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
This commit is contained in:
Saravanan KR 2021-01-12 16:37:54 +05:30
parent 1bfbc7169b
commit 8a79c1b635
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(): def user_passthrough_config():
try: try:
out, err = processutils.execute( out, err = processutils.execute(
'hiera', '-c', '/etc/puppet/hiera.yaml', 'hiera', '-f', 'json', '-c', '/etc/puppet/hiera.yaml',
_PASSTHROUGH_WHITELIST_KEY _PASSTHROUGH_WHITELIST_KEY
) )
if not err: if not err: