apt_sources: check ob >0 in template statt Task (#300)
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#300 Co-authored-by: mg <michael.grote@posteo.de> Co-committed-by: mg <michael.grote@posteo.de>
This commit is contained in:
parent
a1864ad80d
commit
c73037ce5c
2 changed files with 5 additions and 3 deletions
|
@ -3,16 +3,16 @@
|
|||
include_tasks: ubuntu.yml
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- manage_sources_apt_proxy | length > 0
|
||||
- manage_sources_apt_proxy is defined
|
||||
|
||||
- name: include Linux Mint tasks (determined by "ansible_distribution")
|
||||
include_tasks: mint.yml
|
||||
when:
|
||||
- ansible_distribution == 'Linux Mint'
|
||||
- manage_sources_apt_proxy | length > 0
|
||||
- manage_sources_apt_proxy is defined
|
||||
|
||||
- name: include proxmox tasks (determined by group)
|
||||
include_tasks: proxmox.yml
|
||||
when:
|
||||
- "'proxmox' in group_names"
|
||||
- manage_sources_apt_proxy | length > 0
|
||||
- manage_sources_apt_proxy is defined
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{{ file_header | default () }}
|
||||
{% if manage_sources_apt_proxy | length > 0 %}
|
||||
Acquire::http::proxy "http://{{ manage_sources_apt_proxy | default() }}";
|
||||
Acquire::https::proxy "http://{{ manage_sources_apt_proxy | default() }}";
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue