added no_proxy evaluation to logic
diff --git a/tasks/main.yml b/tasks/main.yml
index fee451a..dca5bff 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -18,11 +18,11 @@
- name: Do not use proxy definitions
include: with_no_proxy.yml
- when: (https_proxy is not defined or https_proxy | trim == '') and (http_proxy is not defined or http_proxy | trim == '')
+ when: (https_proxy is not defined or https_proxy | trim == '') and (http_proxy is not defined or http_proxy | trim == '') and (no_proxy is not defined or no_proxy | trim == '')
- name: Use proxy definitions
include: with_proxy.yml
- when: https_proxy is defined and https_proxy | trim != '' and http_proxy is defined and http_proxy | trim != ''
+ when: (https_proxy is defined or https_proxy | trim != '') and (http_proxy is defined or http_proxy | trim != '') and (no_proxy is defined or no_proxy | trim == '')
- name: Start rngd service with no proxy
service:
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml
index efe4f96..6112fce 100644
--- a/tasks/with_proxy.yml
+++ b/tasks/with_proxy.yml
@@ -37,6 +37,7 @@
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
- name: Download pip package manager
become: yes
@@ -48,6 +49,7 @@
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
- name: Install pip package manager
become: yes
@@ -57,4 +59,5 @@
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"