Skip to content

Commit

Permalink
chore: hold check of plotjuggler-ros package and display warning if h…
Browse files Browse the repository at this point in the history
…eld (#4805)

* chore: Hold check of plotjuggler-ros package and display warning if held

Signed-off-by: Naophis <nao1288stusj@gmail.com>

* chore: fix condition for checking held ROS package in dev_tools role

Signed-off-by: Naophis <nao1288stusj@gmail.com>

* style(pre-commit): autofix

* chore: Update dev_tools role to fix condition for checking held ROS package

Signed-off-by: Naophis <nao1288stusj@gmail.com>

---------

Signed-off-by: Naophis <nao1288stusj@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Naophis and pre-commit-ci[bot] committed Jun 3, 2024
1 parent efb89f3 commit c707661
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 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,23 @@
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 c707661

Please sign in to comment.