summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-06-25 03:59:11 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:50 +0200
commit01abd3dbf8e357fd71ebfa41519dc4d1f4bc0bd8 (patch)
tree868ee756f50a550c672c26ee8489cecafbb98062
parentaa909a31051a661ed301f14060e660417dde4d46 (diff)
Don't try to start smart on VMs.
-rw-r--r--roles/common/tasks/smart.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/common/tasks/smart.yml b/roles/common/tasks/smart.yml
index 2c7ac17..3e2e02d 100644
--- a/roles/common/tasks/smart.yml
+++ b/roles/common/tasks/smart.yml
@@ -11,4 +11,5 @@
- name: Start smartd
service: name=smartmontools state=started
- when: ansible_virtualization_role is not defined and ansible_virtualization_type is not defined
+ # smartd can be heavy on VMs, don't bother starting it up if it's down
+ when: not (ansible_processor[0] | search("^QEMU Virtual CPU .*"))