From 0e699415f679f07bf1458e02a38495986a5b010e Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 18 Sep 2017 10:37:22 -0400 Subject: [PATCH] ansible playbook: use the 'package' module Use the 'package' module instead of the 'yum' or 'dnf' module to ensure that packages are installed, and merge the lists of packages for RHEL, CentOS, and Fedora, since they're all exactly the same. Signed-off-by: Nalin Dahyabhai --- contrib/test/crio-integration-playbook.yaml | 44 +++------------------ 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/contrib/test/crio-integration-playbook.yaml b/contrib/test/crio-integration-playbook.yaml index 0ba7beaf..004d2d1f 100644 --- a/contrib/test/crio-integration-playbook.yaml +++ b/contrib/test/crio-integration-playbook.yaml @@ -8,22 +8,21 @@ cni_commit: dcf7368eeab15e2affc6256f0bb1e84dd46a34de tasks: - name: Update all packages - yum: + package: name: '*' state: latest async: 600 poll: 10 when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') ignore_errors: true - - name: Update all packages on Fedora - dnf: + - name: Update all packages + package: name: '*' state: latest async: 600 poll: 10 - when: ansible_distribution == 'Fedora' - - name: Make sure we have all required packages - yum: + - name: Make sure we have all required packages on Fedora and its downstreams + package: name: "{{ item }}" state: latest with_items: @@ -52,38 +51,7 @@ - socat async: 600 poll: 10 - when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') - - name: Make sure we have all required packages on Fedora - dnf: - name: "{{ item }}" - state: latest - with_items: - - wget - - git - - make - - gcc - - tar - - libseccomp-devel - - golang - - glib2-devel - - glibc-static - - container-selinux - - btrfs-progs-devel - - device-mapper-devel - - ostree-devel - - glibc-devel - - gpgme-devel - - libassuan-devel - - libgpg-error-devel - - pkgconfig - - skopeo-containers - - oci-systemd-hook - - oci-register-machine - - oci-umount - - socat - async: 600 - poll: 10 - when: ansible_distribution == 'Fedora' + when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS' or ansible_distribution == 'Fedora') - name: Setup swap to prevent kernel firing off the OOM killer shell: | truncate -s 8G /root/swap && \