Change the way to test if update_cache is needed

This commit is contained in:
Jeremy Gardais 2019-02-27 14:23:17 +01:00
parent e36200e6d9
commit bcd75dd67d
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 4 deletions

View File

@ -29,10 +29,12 @@
## Update cache
- name: Update APT cache
apt:
update_cache: True
when: (openmanage__deploy_state == "present") and
(openmanage__register_repositories.changed or
openmanage__register_key.changed)
update_cache: '{{ True
if (openmanage__register_key is changed or
openmanage__register_repositories is changed)
else
False }}'
when: (openmanage__deploy_state == "present")
# Manage packages [[[1
## Manage depencies packages