Ensure proxy check is short circuit
Otherwise when repo_pkg_cache_enabled is false and repo_pkg_cache_url is https, proxy_check.status will cause an attribute error. Change-Id: Ib0f5326865d11ecbb718e586441c4f7c2a754c9d
This commit is contained in:
parent
f7ca083c02
commit
3a1418afd0
@ -28,9 +28,9 @@
|
|||||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||||
register: apt_proxy_dropped
|
register: apt_proxy_dropped
|
||||||
when:
|
when:
|
||||||
|
- repo_pkg_cache_enabled | bool
|
||||||
- proxy_check.status == 200
|
- proxy_check.status == 200
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
- repo_pkg_cache_enabled | bool
|
|
||||||
tags:
|
tags:
|
||||||
- common-proxy
|
- common-proxy
|
||||||
|
|
||||||
@ -49,9 +49,9 @@
|
|||||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
when:
|
when:
|
||||||
|
- repo_pkg_cache_enabled | bool
|
||||||
- proxy_check.status != 200
|
- proxy_check.status != 200
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
- repo_pkg_cache_enabled | bool
|
|
||||||
tags:
|
tags:
|
||||||
- common-proxy
|
- common-proxy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user