Skip to content

Commit 7eed79c

Browse files
author
Martin Östlund
committed
Fix Idempotence failure on deb based systems
ansible_facts['packages']['thinlinc-server'][0]['version'] includes the the build-id, e.g. 4.16.0-3491, thus the comparison with thinlinc_version will always fail, making the task non-idempotent on Debian-based systems.
1 parent 569d5bb commit 7eed79c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
when: ansible_facts['os_family'] in ["Debian", "Ubuntu", "Linuxmint"]
4141
when: >
4242
(('thinlinc-server' not in ansible_facts['packages']) or
43-
(ansible_facts['packages']['thinlinc-server'][0]['version'] != thinlinc_version))
43+
(ansible_facts['packages']['thinlinc-server'][0]['version'].split('-') | first != thinlinc_version))
4444
and
4545
(('thinlinc-vsm' not in ansible_facts['packages']) or
46-
(ansible_facts['packages']['thinlinc-vsm'][0]['version'] != thinlinc_version))
46+
(ansible_facts['packages']['thinlinc-vsm'][0]['version'].split('-') | first != thinlinc_version))
4747
4848
# Workaround for OpenSUSE Tumbleweed usr merge
4949
# See https://www.cendio.com/bugzilla/show_bug.cgi?id=7829

0 commit comments

Comments
 (0)