updated to manage working with a proxy
diff --git a/tasks/main.yml b/tasks/main.yml
index c275e60..abdfb3b 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,9 +1,10 @@
 ---
-- name: Install Java JDK
-  become: yes
-  yum:
-    name: "java-{{ jdk_version }}.0-openjdk-devel"
-    state: present
+- include: with_no_proxy.yml
+  when: http_proxy is not defined and https_proxy is not defined
+
+- include: with_proxy.yml
+  when: http_proxy is defined and https_proxy is defined
+
 
 - name: Update environment with path to JAVA_HOME
   become: yes
diff --git a/tasks/with_no_proxy.yml b/tasks/with_no_proxy.yml
new file mode 100644
index 0000000..90b1686
--- /dev/null
+++ b/tasks/with_no_proxy.yml
@@ -0,0 +1,6 @@
+---
+- name: Install Java JDK
+  become: yes
+  yum:
+    name: "java-{{ jdk_version }}.0-openjdk-devel"
+    state: present
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml
new file mode 100644
index 0000000..d2e98ce
--- /dev/null
+++ b/tasks/with_proxy.yml
@@ -0,0 +1,10 @@
+---
+- name: Install Java JDK
+  become: yes
+  yum:
+    name: "java-{{ jdk_version }}.0-openjdk-devel"
+    state: present
+  environment:
+    http_proxy: "{{ http_proxy }}"
+    https_proxy: "{{ https_proxy }}"
+