Browse Source

[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)
changes/15/747415/5
Chandan Kumar (raukadah) 1 month ago
parent
commit
559b4493ed
3 changed files with 17 additions and 2 deletions
  1. +1
    -0
      tripleo_ansible/roles/tripleo-podman/defaults/main.yml
  2. +13
    -2
      tripleo_ansible/roles/tripleo-podman/tasks/tripleo_podman_buildah_login.yml
  3. +3
    -0
      tripleo_ansible/roles/tripleo-podman/vars/redhat.yml

+ 1
- 0
tripleo_ansible/roles/tripleo-podman/defaults/main.yml View File

@@ -21,6 +21,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_debug: false


+ 13
- 2
tripleo_ansible/roles/tripleo-podman/tasks/tripleo_podman_buildah_login.yml 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


+ 3
- 0
tripleo_ansible/roles/tripleo-podman/vars/redhat.yml View File

@@ -18,6 +18,9 @@
_tripleo_podman_packages:
- podman

_tripleo_buildah_packages:
- buildah-1.11.6

_tripleo_podman_purge_packages:
- docker
- docker-ce

Loading…
Cancel
Save