2021-04-09 23:29:03 +02:00
|
|
|
---
|
2021-11-23 21:51:18 +01:00
|
|
|
- name: include user tasks
|
|
|
|
include_tasks: user.yml
|
|
|
|
|
|
|
|
- name: ensure smartmontools are installed
|
2020-08-18 11:57:53 +02:00
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2020-08-18 11:57:53 +02:00
|
|
|
name: smartmontools
|
|
|
|
state: present
|
|
|
|
|
2021-11-23 21:51:18 +01:00
|
|
|
- name: template smartmontools config
|
2020-08-18 11:57:53 +02:00
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smartmontools"
|
|
|
|
dest: "/etc/default/smartmontools"
|
2021-11-23 21:51:18 +01:00
|
|
|
owner: "{{ smart_user }}"
|
|
|
|
group: "{{ smart_user_group }}"
|
|
|
|
notify: restart smartmontools
|
2020-08-18 11:57:53 +02:00
|
|
|
|
2021-11-23 21:51:18 +01:00
|
|
|
- name: template smartd.conf
|
2020-08-18 11:57:53 +02:00
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smartd.conf"
|
|
|
|
dest: "/etc/smartd.conf"
|
2021-11-23 21:51:18 +01:00
|
|
|
owner: "{{ smart_user }}"
|
|
|
|
group: "{{ smart_user_group }}"
|
|
|
|
notify: restart smartmontools
|