Skip to content

Commit

Permalink
Fix dpkg_selection on non-existing packages
Browse files Browse the repository at this point in the history
Needed since ansible-core>2.16, see:
ansible/ansible@f10d11b
  • Loading branch information
VannTen committed Mar 8, 2024
1 parent 1a1d73f commit ac1cf5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/container-engine/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@
name: "{{ item }}"
selection: install
when: ansible_pkg_mgr == 'apt'
changed_when: false
register: ret
failed_when:
- ret is failed
- ret.msg != ( "Failed to find package '" + item + "' to perform selection 'install'." )
with_items:
- "{{ containerd_package }}"
- docker-ce
Expand Down

0 comments on commit ac1cf5a

Please sign in to comment.