From ff5e5c17f698c8d83663adbc4cc4986ed7b1cc9d Mon Sep 17 00:00:00 2001
From: Mohammed Naser <mnaser@vexxhost.com>
Date: Sat, 4 Apr 2020 16:01:40 -0400
Subject: [PATCH] ensure-podman: refactor to use ensure--package-repositories

This patch refactors ensure-podman to use the new generic role
to allow it to be cross-platform in the future.

Change-Id: Id9ad0fbaeb9d19d022393ad16a27f11260c45da0
---
 roles/ensure-podman/tasks/Ubuntu.yaml  | 11 ++++++-----
 zuul-tests.d/container-roles-jobs.yaml |  2 ++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/roles/ensure-podman/tasks/Ubuntu.yaml b/roles/ensure-podman/tasks/Ubuntu.yaml
index 472557324..7a55fa8cc 100644
--- a/roles/ensure-podman/tasks/Ubuntu.yaml
+++ b/roles/ensure-podman/tasks/Ubuntu.yaml
@@ -1,8 +1,9 @@
-- name: Install projectatomic PPA
-  apt_repository:
-    repo: 'ppa:projectatomic/ppa'
-    state: present
-  become: yes
+- name: Add all repositories
+  include_role:
+    name: ensure-package-repositories
+  vars:
+    repositories_list:
+      - repo: ppa:projectatomic/ppa
 
 - name: Install podman
   package:
diff --git a/zuul-tests.d/container-roles-jobs.yaml b/zuul-tests.d/container-roles-jobs.yaml
index 3a8c9239e..27b2c1c90 100644
--- a/zuul-tests.d/container-roles-jobs.yaml
+++ b/zuul-tests.d/container-roles-jobs.yaml
@@ -103,6 +103,7 @@
       - roles/pull-from-intermediate-registry/.*
       - roles/push-to-intermediate-registry/.*
       - roles/ensure-podman/.*
+      - roles/ensure-package-repositories/.*
       - roles/build-container-image/.*
       - roles/run-buildset-registry/.*
       - roles/use-buildset-registry/.*
@@ -271,6 +272,7 @@
     abstract: true
     files:
       - roles/ensure-podman/.*
+      - roles/ensure-package-repositories/.*
       - test-playbooks/ensure-podman/.*
     run: test-playbooks/ensure-podman/main.yaml