[tripleo-podman] Install specific version of buildah

tripleo_podman_buildah_login.yml playbook from tripleo_podman
role is used in periodic jobs in upstream & downstream to push
containers.

In CentOS/RHEL, buildah comes from multiple repos, sometimes
untested package from diffferent repo get installed causing
issues. Making it parameterized will help to install specific
version of buildah and avoid breakage.

Change-Id: I751452d4f60ceedd099f76e8127694a96a0b9549
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah) 2020-08-07 16:44:21 +05:30
parent 4cd03b45ac
commit bc80c2aa89
3 changed files with 17 additions and 2 deletions

View File

@ -24,6 +24,7 @@ tripleo_container_registry_insecure_registries: []
tripleo_container_registry_login: false
tripleo_container_registry_logins: {}
tripleo_podman_packages: "{{ _tripleo_podman_packages | default([]) }}"
tripleo_buildah_packages: "{{ _tripleo_buildah_packages | default([]) }}"
tripleo_podman_purge_packages: "{{ _tripleo_podman_purge_packages | default([]) }}"
tripleo_podman_tls_verify: true
tripleo_podman_unqualified_search_registries:

View File

@ -14,12 +14,23 @@
# License for the specific language governing permissions and limitations
# under the License.
- name: Gather variables for each operating system for installing buildah
include_vars: "{{ item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
- "{{ ansible_os_family | lower }}.yml"
- name: ensure buildah is installed
become: true
package:
name: "buildah"
state: latest
name: "{{ tripleo_buildah_packages }}"
state: present
- name: Perform container registry login(s) with buildah
become: true

View File

@ -18,6 +18,9 @@
_tripleo_podman_packages:
- podman-1.6.4
_tripleo_buildah_packages:
- buildah-1.11.6
_tripleo_podman_purge_packages:
- docker
- docker-ce