Skip to content

Commit

Permalink
Merge pull request #1 from quiknode-labs/TEC-1174/implement-nvme-perf…
Browse files Browse the repository at this point in the history
…ormance-benchmarking

fix: TEC-1174/implement-nvme-performance-benchmarking
  • Loading branch information
McSim85 authored Dec 10, 2024
2 parents 3bc09cc + a67dacc commit 23fc9b3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Restart smartd
service:
ansible.builtin.service:
name: "{{ smartd_service_name }}"
state: restarted
enabled: yes
enabled: true
...
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 23fc9b3

Please sign in to comment.