From 15fb5581410abc8fbedfa47aec2db79b1ceec6c0 Mon Sep 17 00:00:00 2001 From: Naophis Date: Mon, 3 Jun 2024 14:33:18 +0900 Subject: [PATCH] chore: Hold check of plotjuggler-ros package and display warning if held Signed-off-by: Naophis --- ansible/roles/dev_tools/tasks/main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index 2a11dd7ffc6..b2d6937f524 100644 --- a/ansible/roles/dev_tools/tasks/main.yaml +++ b/ansible/roles/dev_tools/tasks/main.yaml @@ -37,6 +37,11 @@ state: latest update_cache: true +- name: Hold check of ros-{{ rosdistro }}-plotjuggler-ros + ansible.builtin.command: apt-mark showhold + register: held_ros_packages + changed_when: false + - name: Install plotjuggler become: true ansible.builtin.apt: @@ -44,3 +49,12 @@ - ros-{{ rosdistro }}-plotjuggler-ros state: latest update_cache: true + when: "'ros-' + rosdistro + '-' + plotjuggler-ros not in held_ros_packages.stdout" + register: install_result + failed_when: false + +- name: Display warning if plotjuggler-ros package is held + ansible.builtin.debug: + msg: ROS package 'ros-{{ rosdistro }}-plotjuggler-ros' is apt-mark hold. Skipping installation. + when: not install_result.changed +