From fbfb0909cd77e28323e32e0649cda2fc5ba7f4f8 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 26 Mar 2020 09:09:35 -0400 Subject: [PATCH] Skip proxy tasks when not needed if rhsm_rhsm_proxy_hostname is not defined, we don't need to run the tasks used to configure proxy bits. Change-Id: I15b70179ced343a1abbbb3ca8bd24fed50bfd758 --- tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index d1e5178..9b13274 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,6 +24,8 @@ - rhsm_conf - name: Block to set rhsm_package_manager_config_file + when: + - rhsm_rhsm_proxy_hostname is defined tags: - rhsm - rhsm_conf @@ -40,6 +42,8 @@ - ansible_pkg_mgr == 'dnf' - name: Configure proxy settings to package manager + when: + - rhsm_rhsm_proxy_hostname is defined ini_file: path: "{{ rhsm_package_manager_config_file }}" section: main