diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index 2a11dd7ffc6..1a7d3c6511a 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,11 @@ - 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