homeserver/roles/mgrote.smart/tasks/main.yml

28 lines
696 B
YAML
Raw Normal View History

---
- name: include user tasks
include_tasks: user.yml
- name: ensure smartmontools are installed
2020-08-18 11:57:53 +02:00
become: yes
ansible.builtin.package:
2020-08-18 11:57:53 +02:00
name: smartmontools
state: present
- name: template smartmontools config
2020-08-18 11:57:53 +02:00
become: yes
ansible.builtin.template:
2020-08-18 11:57:53 +02:00
src: "smartmontools"
dest: "/etc/default/smartmontools"
owner: "{{ smart_user }}"
group: "{{ smart_user_group }}"
notify: restart smartmontools
2020-08-18 11:57:53 +02:00
- name: template smartd.conf
2020-08-18 11:57:53 +02:00
become: yes
ansible.builtin.template:
2020-08-18 11:57:53 +02:00
src: "smartd.conf"
dest: "/etc/smartd.conf"
owner: "{{ smart_user }}"
group: "{{ smart_user_group }}"
notify: restart smartmontools