Update for 2 regions with network timeout issue
diff --git a/tasks/main.yml b/tasks/main.yml index 8409cac..3472c6a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -4,9 +4,9 @@ when: ansible_distribution_major_version is not defined or ansible_distribution is not defined or ansible_bios_version is not defined - name: Configure EPEL with no proxy - include: with_no_proxy.yml + include_tasks: with_no_proxy.yml 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: Configure EPEL with proxy - include: with_proxy.yml + include_tasks: with_proxy.yml 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 != '')
diff --git a/tasks/with_no_proxy.yml b/tasks/with_no_proxy.yml index cf92b84..48613a1 100644 --- a/tasks/with_no_proxy.yml +++ b/tasks/with_no_proxy.yml
@@ -12,9 +12,9 @@ - name: Update EPEL with no proxy yum: name: epel-release - state: present + state: absent -#- name: Update EPEL with no proxy -# yum: -# name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" -# state: present +- name: Update EPEL with no proxy + yum: + name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" + state: present
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml index da2e238..be7726a 100644 --- a/tasks/with_proxy.yml +++ b/tasks/with_proxy.yml
@@ -12,7 +12,7 @@ - name: Update EPEL with proxy yum: name: epel-release - state: present + state: absent environment: http_proxy: "{{ http_proxy }}" https_proxy: "{{ https_proxy }}"