From dee9f998348834d15f520411b9cdc8830aa21f05 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 31 Oct 2024 21:39:11 +0900 Subject: [PATCH] Fix ternary usage --- ansible/roles/azure_kinect/tasks/main.yaml | 4 ++-- ansible/roles/realsense/tasks/main.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/azure_kinect/tasks/main.yaml b/ansible/roles/azure_kinect/tasks/main.yaml index 9e7c4673a6c..a754c507deb 100644 --- a/ansible/roles/azure_kinect/tasks/main.yaml +++ b/ansible/roles/azure_kinect/tasks/main.yaml @@ -55,7 +55,7 @@ - name: Download closed-source firmware ansible.builtin.get_url: - url: https://packages.microsoft.com/ubuntu/18.04/multiarch/prod/pool/main/libk/libk4a1.4/libk4a1.4_1.4.1_{{ ansible_architecture == 'x86_64' | ternary('amd64', 'arm64') }}.deb + url: https://packages.microsoft.com/ubuntu/18.04/multiarch/prod/pool/main/libk/libk4a1.4/libk4a1.4_1.4.1_{{ (ansible_architecture == 'x86_64') | ternary('amd64', 'arm64') }}.deb dest: /tmp/Azure-Kinect-Sensor-SDK/libk4a.deb mode: 0644 become: true @@ -64,7 +64,7 @@ ansible.builtin.shell: | cd /tmp/Azure-Kinect-Sensor-SDK ar vx libk4a.deb && tar zxvf data.tar.gz - cp usr/lib/*/libk4a1.4/libdepthengine.so.2.0 /usr/lib/{{ ansible_architecture == 'x86_64' | ternary('x86_64', 'aarch64') }}-linux-gnu/ + cp usr/lib/*/libk4a1.4/libdepthengine.so.2.0 /usr/lib/{{ (ansible_architecture == 'x86_64') | ternary('x86_64', 'aarch64') }}-linux-gnu/ register: firmware_result changed_when: firmware_result.rc == 0 become: true diff --git a/ansible/roles/realsense/tasks/main.yaml b/ansible/roles/realsense/tasks/main.yaml index d5c571ade45..c82a5c5de4e 100644 --- a/ansible/roles/realsense/tasks/main.yaml +++ b/ansible/roles/realsense/tasks/main.yaml @@ -43,7 +43,7 @@ cd /tmp/librealsense mkdir build cd build - cmake .. -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_CUDA={{ cuda_check.rc == 0 | ternary("ON", "OFF") }} + cmake .. -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_CUDA={{ (cuda_check.rc == 0) | ternary("ON", "OFF") }} make -j$(nproc) register: build_result changed_when: build_result.rc == 0