aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/sut/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/sut/tasks')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml8
-rw-r--r--resources/tools/testbed-setup/ansible/roles/sut/tasks/taishan_workaround.yaml30
-rw-r--r--resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu.yaml (renamed from resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_x86_64.yaml)2
3 files changed, 37 insertions, 3 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
index 0ecdcdba3b..f5a2dd86ad 100644
--- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
@@ -2,8 +2,12 @@
# file: roles/sut/tasks/main.yaml
- name: Ubuntu specific
- import_tasks: ubuntu_x86_64.yaml
- when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'
+ import_tasks: ubuntu.yaml
+ when: ansible_distribution|lower == 'ubuntu'
+
+- name: Taishan aarch64 specific
+ import_tasks: taishan_workaround.yaml
+ when: taishan_workaround is defined
- name: Copy 80-vpp.conf
file:
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
index 0000000000..e262e7288b
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/taishan_workaround.yaml
@@ -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
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu.yaml
index 38946b6bbb..824f0926b5 100644
--- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_x86_64.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu.yaml
@@ -1,5 +1,5 @@
---
-# file: roles/sut/tasks/ubuntu_x86_64.yaml
+# file: roles/sut/tasks/ubuntu.yaml
- name: Install DKMS
apt: