Skip to content

Commit

Permalink
Merge pull request #130 from jpiron/cache_updates
Browse files Browse the repository at this point in the history
Update caches only when required
  • Loading branch information
angstwad authored Jan 9, 2017
2 parents f114ad4 + 715e233 commit a542895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
apt:
pkg: dmsetup
state: "{{ dmsetup_pkg_state }}"
update_cache: yes
update_cache: "{{ 'yes' if dmsetup_pkg_state=='latest' else 'no' }}"
cache_valid_time: 600
register: dmsetup_result
when: ansible_distribution_version|version_compare(16.04, '=')
Expand Down Expand Up @@ -68,7 +68,7 @@
apt:
name: "{{ docker_pkg_name }}"
state: "{{ 'latest' if update_docker_package else 'present' }}"
update_cache: yes
update_cache: "{{ update_docker_package }}"
cache_valid_time: "{{ docker_apt_cache_valid_time }}"

- name: Set systemd playbook var
Expand Down

0 comments on commit a542895

Please sign in to comment.