summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfumingwei <[email protected]>2024-04-23 11:59:03 +0800
committerfumingwei <[email protected]>2024-04-23 12:00:59 +0800
commit5651823ac3f5dea7db3bafaba7f149004d7b72cc (patch)
tree009d0ce49631f543e20a59226f5d5ff0f56ce9c3
parentc95cc590bd9d98dbfb92faaca7b4c59b73a447dd (diff)
bugfix:OMPUB-1239:Set fstrim.timer oncalendar to daily.v24.02.12
-rw-r--r--ansible/roles/tsg-os-HAL/files/timer.d/timer_override_oncalendar.conf3
-rw-r--r--ansible/roles/tsg-os-HAL/tasks/main.yml7
2 files changed, 10 insertions, 0 deletions
diff --git a/ansible/roles/tsg-os-HAL/files/timer.d/timer_override_oncalendar.conf b/ansible/roles/tsg-os-HAL/files/timer.d/timer_override_oncalendar.conf
new file mode 100644
index 00000000..5ad880fc
--- /dev/null
+++ b/ansible/roles/tsg-os-HAL/files/timer.d/timer_override_oncalendar.conf
@@ -0,0 +1,3 @@
+[Timer]
+OnCalendar=
+OnCalendar=daily \ No newline at end of file
diff --git a/ansible/roles/tsg-os-HAL/tasks/main.yml b/ansible/roles/tsg-os-HAL/tasks/main.yml
index 29c9c760..e0de03fc 100644
--- a/ansible/roles/tsg-os-HAL/tasks/main.yml
+++ b/ansible/roles/tsg-os-HAL/tasks/main.yml
@@ -57,6 +57,13 @@
- tsg-os-HAL.conf
when: runtime_env == 'TSG-X-P0906'
+- name: "Override fstrim.timer OnCalendar"
+ copy:
+ src: "{{ role_path }}/files/timer.d/timer_override_oncalendar.conf"
+ dest: /usr/lib/systemd/system/fstrim.timer.d/
+ mode: 0644
+ when: runtime_env == 'TSG-X-P0906'
+
- name: "enable fstrim.timer"
systemd:
name: fstrim.timer