updated variables scope
diff --git a/defaults/main.yml b/defaults/main.yml
index b00a281..4f430d7 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1,3 +1,8 @@
---
# defaults file for apigee-opdk-setup-jdk
+# Target Java JDK version
+jdk_version: '1.8'
+
+# System file path to use in JAVA_HOME
+java_home: /usr/lib/jvm/java-openjdk
diff --git a/tasks/main.yml b/tasks/main.yml
index c906be0..02f060e 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,11 +1,18 @@
---
+- name: Update cache with key and value
+ cache:
+ key: "{{ item.key }}"
+ value: "{{ item.value }}"
+ with_items:
+ - { key: "jdk_version", value: "{{ jdk_version }}" }
+ - { key: 'java_home', value: '{{ java_home }}' }
+
- 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 == '')
- include: with_proxy.yml
when: https_proxy is defined and https_proxy | trim != '' and http_proxy is defined and http_proxy | trim != ''
-
- name: Update environment with path to JAVA_HOME
become: yes
lineinfile: