Ansible testbed setup for Taishan testbed
[csit.git] / resources / tools / testbed-setup / ansible / roles / sut / tasks / taishan_workaround.yaml
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/taishan_workaround.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/taishan_workaround.yaml
new file mode 100644 (file)
index 0000000..e262e72
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# file: roles/sut/tasks/taishan_workaround.yaml
+
+- name: Ensure systemd directory exists
+  file:
+    path: "/etc/systemd/system"
+    state: "directory"
+    owner: "root"
+    group: "root"
+    mode: "0755"
+  tags: taishan-workaround
+
+- name: Copy systemd numa config unit file
+  template:
+    src: "files/taishan_workaround.service"
+    dest: "/etc/systemd/system/nic-numa-config.service"
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  register: numa_config_service
+  tags: taishan-workaround
+
+- name: Reload systemd daemon
+  command: "systemctl daemon-reload"
+  when: (numa_config_service and numa_config_service is changed)
+  tags: taishan-workaround
+
+- name: Enable numa config service
+  command: "systemctl enable nic-numa-config.service"
+  tags: taishan-workaround