updated variables scope
diff --git a/defaults/main.yml b/defaults/main.yml index 46d7486..d7489db 100644 --- a/defaults/main.yml +++ b/defaults/main.yml
@@ -1,2 +1,10 @@ --- -# defaults file for apigee-opdk-setup-local-repository \ No newline at end of file +# defaults file for apigee-opdk-setup-local-repository + +apigee_mirror_version: "{{ opdk_version }}" + +# Choose whether to copy the Apigee Mirror archive from your control machine or use an existing archive on the server. +copy_archive: yes + +# Apigee archive that is created when a mirror is used. +apigee_archive_name: apigee-{{ opdk_version }}.tar.gz
diff --git a/tasks/main.yml b/tasks/main.yml index 5eb3e6a..443ba5c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -1,10 +1,16 @@ --- +- name: Update cache with key and value + cache: + key: "{{ item.key }}" + value: "{{ item.value }}" + with_items: + - { key: 'apigee_mirror_version', value: '{{ apigee_mirror_version }}' } + # tasks file for apigee-opdk-setup-local-repository - name: Install the local mirror with no proxy include_tasks: with_no_proxy.yml when: https_proxy is defined and https_proxy | trim != '' and http_proxy is defined and http_proxy | trim != '' - - name: Install the local mirror with no proxy include_tasks: with_proxy.yml when: (https_proxy is not defined or https_proxy | trim == '') and (http_proxy is not defined or http_proxy | trim == '')
diff --git a/tasks/with_no_proxy.yml b/tasks/with_no_proxy.yml index ce3b996..ed95dce 100644 --- a/tasks/with_no_proxy.yml +++ b/tasks/with_no_proxy.yml
@@ -1,4 +1,5 @@ --- +--- # tasks file for apigee-opdk-setup-local-repository - name: Install the local mirror with no proxy shell: "{{ apigee_service }} apigee-mirror install"