apt: fix build-dep idempotency (#38999)

This commit is contained in:
Martin Krizek 2018-04-20 07:57:14 +02:00 committed by René Moser
commit 62d2df74b0
2 changed files with 29 additions and 1 deletions

View file

@ -213,3 +213,26 @@
with_items:
- libcaca-dev
- libslang2-dev
# https://github.com/ansible/ansible/issues/38995
- name: build-dep for a package
apt:
name: tree
state: build-dep
register: apt_result
- name: Check the result
assert:
that:
- apt_result is changed
- name: build-dep for a package (idempotency)
apt:
name: tree
state: build-dep
register: apt_result
- name: Check the result
assert:
that:
- apt_result is not changed