From 3a5a4b57c83d9a6b06807315fd2de33852e23257 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 14 Jul 2014 03:24:39 +0200 Subject: Don't install smartd on Xen guests. S.M.A.R.T makes little sense for virtual HDDs. --- roles/common/tasks/main.yml | 1 + roles/common/tasks/smart.yml | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'roles/common/tasks') diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 903e834..c98af99 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -9,6 +9,7 @@ - include: clamav.yml tags=clamav - include: fail2ban.yml tags=fail2ban - include: smart.yml tags=smartmontools,smart + when: "not (ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'xen')" - include: haveged.yml tags=haveged,entropy - name: Copy genkeypair.sh copy: src=usr/local/bin/genkeypair.sh diff --git a/roles/common/tasks/smart.yml b/roles/common/tasks/smart.yml index 56502ea..b24b302 100644 --- a/roles/common/tasks/smart.yml +++ b/roles/common/tasks/smart.yml @@ -1,5 +1,5 @@ - name: Install smartmontools - # apt-listbugs complains due to #706909. + # XXX apt-listbugs complains due to #706909. apt: pkg=smartmontools - name: Auto-enable smartmontools @@ -11,5 +11,3 @@ - name: Start smartd service: name=smartmontools state=started - # 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 .*")) -- cgit v1.2.3