Update apt after proxy config is dropped
Added an apt update after the apt proxy configuration file is dropped. The error that was seen is that certain packages could not be authenticated. Updating apt after the proxy is configure solves the issue. Change-Id: Ib971231f81442b74868e692d7d47b1ce827e9c7d Closes-Bug: #1649416
This commit is contained in:
parent
9197e3cfc5
commit
caa8732633
@ -24,11 +24,18 @@
|
||||
copy:
|
||||
content: 'Acquire::http { Proxy "{{ repo_pkg_cache_url }}"; };'
|
||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||
register: apt_proxy_dropped
|
||||
when:
|
||||
- proxy_check.status == 200
|
||||
- ansible_os_family == 'Debian'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
|
||||
- name: Update apt when proxy is added
|
||||
apt:
|
||||
update_cache: yes
|
||||
when:
|
||||
- apt_proxy_dropped | changed
|
||||
|
||||
- name: Remove apt package manager proxy
|
||||
file:
|
||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||
|
Loading…
Reference in New Issue
Block a user