1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-27 17:06:10 +02:00

common: override smartd.service with ConditionVirtualization=no

This is needed for the role to work in containers. The option will also
be applied upstream, see the upstream ticket:
https://github.com/smartmontools/smartmontools/issues/62
This commit is contained in:
Jakub Klinkovský 2020-08-20 12:34:06 +02:00
parent 37d6326c8c
commit b4c97002f5
No known key found for this signature in database
GPG Key ID: AB5964AEB9FEDDDC
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,2 @@
[Unit]
ConditionVirtualization=no

View File

@ -23,8 +23,16 @@
pacman: name=smartmontools state=present
when: "'hcloud' not in group_names"
# override smartd.service with ConditionVirtualization=no
# this should appear in the next upstream release, see https://github.com/smartmontools/smartmontools/issues/62
- name: create drop-in directory for smartd.service
file: path=/etc/systemd/system/smartd.service.d state=directory owner=root group=root mode=0755
- name: install drop-in snippet for smartd.service
copy: src=smartd-override.conf dest=/etc/systemd/system/smartd.service.d/override.conf owner=root group=root mode=0644
- name: start and enable smart
service: name=smartd enabled=yes state=started
service: name=smartd enabled=yes state=started daemon_reload=yes
when: "'hcloud' not in group_names"
- name: start and enable btrfs scrub timer