From 7e0c346c8406eb6142e8d38fdec4e13236f3cdc6 Mon Sep 17 00:00:00 2001 From: Russell Teague Date: Wed, 16 Nov 2016 16:30:28 -0500 Subject: Refactor to use Ansible package module The Ansible package module will call the correct package manager for the underlying OS. --- roles/openshift_facts/tasks/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'roles/openshift_facts/tasks/main.yml') diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 4d4a232cc..70cf49dd4 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -10,12 +10,11 @@ - set_fact: l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}" -- name: Ensure PyYaml is installed - action: "{{ ansible_pkg_mgr }} name=PyYAML state=present" - when: not l_is_atomic | bool - -- name: Ensure yum-utils is installed - action: "{{ ansible_pkg_mgr }} name=yum-utils state=present" +- name: Ensure PyYaml and yum-utils are installed + package: name={{ item }} state=present + with_items: + - PyYAML + - yum-utils when: not l_is_atomic | bool - name: Gather Cluster facts and set is_containerized if needed -- cgit v1.2.3