apt: use conditionnal instead of handler for update
This commit is contained in:
parent
acf85bfffc
commit
17ddda8ed3
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- name: apt update
|
||||
apt:
|
||||
update_cache: yes
|
|
@ -13,7 +13,7 @@
|
|||
dest: /etc/apt/sources.list.d/backports.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
notify: apt update
|
||||
register: apt_backports_list
|
||||
tags:
|
||||
- apt
|
||||
|
||||
|
@ -23,11 +23,13 @@
|
|||
dest: /etc/apt/preferences.d/0-backports-defaults
|
||||
force: yes
|
||||
mode: "0640"
|
||||
notify: apt update
|
||||
register: apt_backports_config
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Intermediate flush of handlers
|
||||
meta: flush_handlers
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_backports_list | changed or apt_backports_config | changed
|
||||
tags:
|
||||
- apt
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
dest: /etc/apt/sources.list
|
||||
mode: "0644"
|
||||
force: yes
|
||||
notify: apt update
|
||||
register: apt_basic_list
|
||||
tags:
|
||||
- apt
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
|||
- /etc/apt/sources.list.d/debian-update.list
|
||||
when: apt_clean_gandi_sourceslist
|
||||
|
||||
- name: Intermediate flush of handlers
|
||||
meta: flush_handlers
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_basic_list | changed
|
||||
tags:
|
||||
- apt
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
dest: /etc/apt/sources.list.d/evolix_public.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
notify: apt update
|
||||
register: apt_evolix_public
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Intermediate flush of handlers
|
||||
meta: flush_handlers
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_evolix_public | changed
|
||||
tags:
|
||||
- apt
|
||||
|
|
Loading…
Reference in New Issue