[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>
(cherry picked from commit bc80c2aa89)
This commit is contained in:
Chandan Kumar (raukadah) 2020-08-07 16:44:21 +05:30
parent dc7fdb0ed2
commit 559b4493ed
3 changed files with 17 additions and 2 deletions

View File

@ -21,6 +21,7 @@ tripleo_container_registry_insecure_registries: []
tripleo_container_registry_login: false tripleo_container_registry_login: false
tripleo_container_registry_logins: {} tripleo_container_registry_logins: {}
tripleo_podman_packages: "{{ _tripleo_podman_packages | default([]) }}" 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_purge_packages: "{{ _tripleo_podman_purge_packages | default([]) }}"
tripleo_podman_tls_verify: true tripleo_podman_tls_verify: true
tripleo_podman_debug: false tripleo_podman_debug: false

View File

@ -14,12 +14,23 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 - name: ensure buildah is installed
become: true become: true
package: package:
name: "buildah" name: "{{ tripleo_buildah_packages }}"
state: latest state: present
- name: Perform container registry login(s) with buildah - name: Perform container registry login(s) with buildah
become: true become: true

View File

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