Simplify FastForwardRepoArgs structure used in FFU repo selection.

The current structure is unnecessarily complex forcing the use of
json_query filter with a parameter.  The quoting inside that line
become hard to read and is currently failing.

We change the structure to a simple hash, as this is currently all
what is needed.

Change-Id: I17f2d1b4e549e275d7d6a675cd522c6b567815ac
Closes-Bug: #1749911
This commit is contained in:
Sofer Athlan-Guyot 2018-02-16 11:43:05 +01:00 committed by Athlan-Guyot sofer
parent 3b50fdf886
commit 19029070c5

View File

@ -38,7 +38,7 @@ parameters:
default: 'tripleo-repos'
type: string
FastForwardRepoArgs:
default: {'tripleo_repos': [{'release': 'ocata', 'args': '-b ocata current'}, {'release': 'pike', 'args': '-b pike current'}]}
default: {'tripleo_repos': {'ocata': '-b ocata current', 'pike': '-b pike current'}}
type: json
outputs:
@ -114,9 +114,7 @@ outputs:
args:
chdir: /home/stack/tripleo-repos/
- name: Enable tripleo-repos
command: tripleo-repos {{ cmd_args | join(' ') }}
vars:
cmd_args: "{{ fast_forward_repo_args | json_query('tripleo_repos[?release=='+release+'].args') }}"
command: "tripleo-repos {{ fast_forward_repo_args.tripleo_repos[release] | join(' ') }}"
when:
- step|int == 3
- is_bootstrap_node|bool