Base container - Fix bash condition for rhel case

This is to fix regression from [1] which is breaking container
build in downstream as its not enabling correct dnf stream for
rhel8 case.

Also, We can see below in logs:-
~~~
/bin/sh: line 1: [: missing `]'
~~~

With this patch, We are correcting the bash condition as per
guidelines for logical operator for bash in [2].

[1] https://review.opendev.org/c/openstack/tripleo-common/+/823846
[2] https://tecadmin.net/use-logical-or-and-in-shell-script/

Closes-Bug: rhbz#2041484
Change-Id: Ib9a712eb1fb225b97f6b1f19a42ddd15c6ce537b
This commit is contained in:
Sandeep Yadav 2022-01-18 14:57:27 +05:30
parent ebf54cb5a0
commit edc0199bc4
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ tcib_actions:
crudini --set /etc/dnf/dnf.conf main skip_missing_names_on_install False &&
crudini --set /etc/dnf/dnf.conf main tsflags nodocs
- run: >-
if [ '{{ tcib_distro }}' == 'rhel' && '{{ tcib_release }}' == '8' ]; then
if [ '{{ tcib_distro }}' == 'rhel' ] && [ '{{ tcib_release }}' == '8' ]; then
{%- if "el" ~ tcib_release in tcib_packages.modules %}
{% for item in tcib_packages.modules["el" ~ tcib_release] %}{% set key, value = (item.items() | list).0 %}dnf module -y {{ key }} {{ value }}; {% endfor %}
{%- else %}