Set changed_when to false for apt update command

This commit is contained in:
2026-07-31 13:05:14 +02:00
parent 42f6ff8de8
commit 76395661b1
7 changed files with 7 additions and 0 deletions
+1
View File
@@ -160,6 +160,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
+1
View File
@@ -10,6 +10,7 @@
state: present state: present
cache_valid_time: 3600 cache_valid_time: 3600
update_cache: true update_cache: true
changed_when: false
- name: (pure-ftpd-install.yml) Upload Pure-FTPd global configuration file. - name: (pure-ftpd-install.yml) Upload Pure-FTPd global configuration file.
ansible.builtin.template: ansible.builtin.template:
@@ -21,6 +21,7 @@
name: ['x11vnc'] name: ['x11vnc']
update_cache: true update_cache: true
state: present state: present
changed_when: false
when: not common_x11vnc_active.stat.exists when: not common_x11vnc_active.stat.exists
- name: "(ubuntu-x11vnc-1604-amd64.yml) Store password" - name: "(ubuntu-x11vnc-1604-amd64.yml) Store password"
@@ -16,6 +16,7 @@
name: "{{ packages }}" name: "{{ packages }}"
update_cache: true update_cache: true
state: present state: present
changed_when: false
vars: vars:
packages: packages:
- x11vnc - x11vnc
@@ -16,6 +16,7 @@
name: "{{ packages }}" name: "{{ packages }}"
update_cache: true update_cache: true
state: present state: present
changed_when: false
vars: vars:
packages: packages:
- x11vnc - x11vnc
@@ -16,6 +16,7 @@
name: "{{ packages }}" name: "{{ packages }}"
update_cache: true update_cache: true
state: present state: present
changed_when: false
vars: vars:
packages: packages:
- x11vnc - x11vnc
@@ -16,6 +16,7 @@
name: "{{ packages }}" name: "{{ packages }}"
update_cache: true update_cache: true
state: present state: present
changed_when: false
vars: vars:
packages: packages:
- x11vnc - x11vnc