]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-node-exporter: use modprobe ansible module
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 11 Jun 2019 13:35:28 +0000 (09:35 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 11 Jun 2019 19:40:50 +0000 (21:40 +0200)
Instead of using the modprobe command from the path in the systemd
unit script, we can use the modprobe ansible module.
That way we don't have to manage the binary path based on the linux
distribution.

Resolves: #4072

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-node-exporter/tasks/setup_container.yml
roles/ceph-node-exporter/templates/node_exporter.service.j2

index 2dd4dd100a9d000e7ecdd22e4b949773462a45b5..add7d1d7b307421050c496045d6e8893b316087d 100644 (file)
@@ -7,6 +7,11 @@
     group: root
     mode: 0644
 
+- name: add the cfg80211 module
+  modprobe:
+    name: cfg80211
+    state: present
+
 - name: start the node_exporter service
   systemd:
     name: node_exporter
index 1f5dd715059964905bd6a248c1baf9fb4479d66a..caad8baa97379ad27e79006ce1c8d3886e5b2010 100644 (file)
@@ -18,9 +18,6 @@ ExecStart=/usr/bin/{{ container_binary }} run --name=node-exporter \
   --path.procfs=/host/proc \
   --path.sysfs=/host/sys \
   --no-collector.timex \
-# Make sure the cfg80211 is loaded before running the container, the node
-# exporter needs this module loaded to test for presence of wi-fi devices
-ExecStartPre=/usr/sbin/modprobe cfg80211
 ExecStop=-/usr/bin/{{ container_binary }} stop node-exporter
 Restart=always
 RestartSec=10s