Skip to content

Commit

Permalink
chore: Hold check of plotjuggler-ros package and display warning if held
Browse files Browse the repository at this point in the history
Signed-off-by: Naophis <[email protected]>
  • Loading branch information
Naophis committed Jun 3, 2024
1 parent efb89f3 commit 15fb558
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ansible/roles/dev_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,24 @@
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:
name:
- 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

0 comments on commit 15fb558

Please sign in to comment.