forked from stuvusIT/smartd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from quiknode-labs/TEC-1174/implement-nvme-perf…
…ormance-benchmarking fix: TEC-1174/implement-nvme-performance-benchmarking
- Loading branch information
Showing
3 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |