fix: set changed_when to false for apt update command.
This commit is contained in:
@@ -169,6 +169,7 @@
|
|||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
||||||
|
changed_when: false
|
||||||
when: apt_update|bool
|
when: apt_update|bool
|
||||||
tags:
|
tags:
|
||||||
- apt-update
|
- apt-update
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
||||||
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- ansible_facts["distribution"] == "Debian"
|
- ansible_facts["distribution"] == "Debian"
|
||||||
- apt_update|bool
|
- apt_update|bool
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
if apt_config_updated is defined and apt_config_updated.changed
|
if apt_config_updated is defined and apt_config_updated.changed
|
||||||
else apt_update_cache_valid_time
|
else apt_update_cache_valid_time
|
||||||
}}
|
}}
|
||||||
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- ansible_facts['distribution'] == "Debian"
|
- ansible_facts['distribution'] == "Debian"
|
||||||
- apt_update|bool
|
- apt_update|bool
|
||||||
|
|||||||
Reference in New Issue
Block a user