]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Split out ethtool install so we can enable epel on CentOS
authorDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2022 19:06:57 +0000 (15:06 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2022 20:07:50 +0000 (16:07 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/tasks/secondary_nic.yml

index 8eb2ef693e75ecd2044091b384a9b06bb144500b..557201b5f100c5e396f07dac4b5cd03bada2a736 100644 (file)
@@ -1,8 +1,18 @@
 ---
-- name: Make sure ethtool is installed
-  package:
+- name: Make sure ethtool is installed (Ubuntu)
+  apt:
     name: ethtool
-    state: latest
+    state: present
+  when: ansible_os_family == 'Debian'
+
+- name: Make sure ethtool is installed (CentOS/RHEL)
+  yum:
+    name: ethtool
+    state: present
+    enablerepo: epel
+  when:
+    - ansible_os_family == 'RedHat'
+    - enable_epel|bool == true
 
 - name: grep ethtool for secondary NIC MAC address
   shell: "ethtool -P {{ item }} | awk '{ print $3 }' | grep -q -i '{{ secondary_nic_mac }}'"