From a67dacc7f806a292fcdd0b11f91b509d955f1a2c Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Sun, 8 Dec 2024 15:05:15 +0100 Subject: [PATCH] fix: TEC-1174/implement-nvme-performance-benchmarking --- defaults/main.yml | 10 +++++----- handlers/main.yml | 4 ++-- tasks/main.yml | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 754ad39..2074b60 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,8 +4,8 @@ smartd_devices: smartd_default_type: auto smartd_default_nocheck: standby,15,q smartd_default_check_type: normal -smartd_default_attribute_autosave: True -smartd_default_check_health_return_status: True +smartd_default_attribute_autosave: true +smartd_default_check_health_return_status: true smartd_default_report_error_types: - error - xerror @@ -18,9 +18,9 @@ smartd_default_test_schedule: (L/../../6/01|S/../.././02) smartd_default_mail_frequency: diminishing smartd_default_mail_script: smartd_default_mail_recipients: [] -smartd_default_report_ata_failure: True -smartd_default_report_ata_prefail: True -smartd_default_report_ata_usage: False +smartd_default_report_ata_failure: true +smartd_default_report_ata_prefail: true +smartd_default_report_ata_usage: true smartd_default_ata_pending_id: 197+ smartd_default_ata_uncorrectable_id: 198+ smartd_default_temperature_report_diff: 10 diff --git a/handlers/main.yml b/handlers/main.yml index 5e87daf..ab00a95 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,7 +1,7 @@ --- - name: Restart smartd - service: + ansible.builtin.service: name: "{{ smartd_service_name }}" state: restarted - enabled: yes + enabled: true ... diff --git a/tasks/main.yml b/tasks/main.yml index ef3ef0c..a190b6c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,28 +1,28 @@ --- # Check vars/main.yml to set distro-specific config file location - name: Set the smartd configuration file path - set_fact: + ansible.builtin.set_fact: smartd_config_path: "{{ smartd_possible_config_paths[ansible_distribution] | default(smartd_possible_config_paths.default) }}" smartd_file_group: "{{ smartd_possible_file_group[ansible_distribution] | default(smartd_possible_file_group.default) }}" smartd_service_name: "{{ smartd_service_possible_name[ansible_distribution] | default(smartd_service_possible_name.default) }}" - name: Install smartmontools - package: + ansible.builtin.package: name: smartmontools when: ansible_pkg_mgr in ["apt", "pacman", "dnf", "yum", "pkgng"] - name: Create smartd configuration - template: + ansible.builtin.template: src: smartd.conf.j2 dest: "{{ smartd_config_path }}" owner: root group: "{{ smartd_file_group }}" - mode: 0644 + mode: "0644" validate: smartd -q onecheck -c %s notify: Restart smartd - name: Enable smartd - service: + ansible.builtin.service: name: "{{ smartd_service_name }}" state: started - enabled: yes + enabled: true