From 02bf742e15bcd821be69ccbab17b2d267b7a9024 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 12 Feb 2018 12:11:57 +0000 Subject: [PATCH] roles: rkt: Add support for SUSE distributions The RPM file that's provided by upstream can be used for SUSE distributions as well. Moreover we simplify the playbook to use the 'package' module to install packages across different distros. Link: https://github.com/rkt/rkt/pull/3904 --- roles/rkt/tasks/install.yml | 17 +++-------------- roles/rkt/vars/suse.yml | 2 ++ 2 files changed, 5 insertions(+), 14 deletions(-) create mode 100644 roles/rkt/vars/suse.yml diff --git a/roles/rkt/tasks/install.yml b/roles/rkt/tasks/install.yml index 599f9e50e..cbaaf4085 100644 --- a/roles/rkt/tasks/install.yml +++ b/roles/rkt/tasks/install.yml @@ -15,22 +15,11 @@ tags: - facts -- name: install rkt pkg on ubuntu - apt: - deb: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" +- name: install rkt pkg + package: + name: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" state: present register: rkt_task_result until: rkt_task_result|succeeded retries: 4 delay: "{{ retry_stagger | random + 3 }}" - when: ansible_os_family == "Debian" - -- name: install rkt pkg on centos - yum: - pkg: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" - state: present - register: rkt_task_result - until: rkt_task_result|succeeded - retries: 4 - delay: "{{ retry_stagger | random + 3 }}" - when: ansible_os_family == "RedHat" diff --git a/roles/rkt/vars/suse.yml b/roles/rkt/vars/suse.yml new file mode 100644 index 000000000..13149e8fb --- /dev/null +++ b/roles/rkt/vars/suse.yml @@ -0,0 +1,2 @@ +--- +rkt_pkg_name: "rkt-{{ rkt_pkg_version }}.x86_64.rpm"