updated bootstrap permissions
diff --git a/tasks/install-bootstrap.yml b/tasks/install-bootstrap.yml index a4fdfda..c9116de 100644 --- a/tasks/install-bootstrap.yml +++ b/tasks/install-bootstrap.yml
@@ -23,6 +23,19 @@ no_proxy: "{{ no_proxy }}" http_proxy: "{{ http_proxy }}" https_proxy: "{{ https_proxy }}" + rescue: + - name: Update apigee-service if upgrade_edge is set as part of an upgrade with proxy + become: yes + become_user: root + command: "{{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword='{{ apigee_repo_password }}' JAVA_FIX=C" + env: + JAVA_HOME: '{{ java_home }}' + when: upgrade_edge is defined and upgrade_edge | bool == True and opdk_debug_mode is not defined or opdk_debug_mode | trim | lower == 'off' + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + when: (apigee_repo_uri is not defined or apigee_repo_uri | trim | length == 0) - block: @@ -57,6 +70,24 @@ no_proxy: "{{ no_proxy }}" http_proxy: "{{ http_proxy }}" https_proxy: "{{ https_proxy }}" + + rescue: + - name: Install bootstrap from the provided apigee_repo_uri and apigee_repo_protocol with proxy + become: yes + become_user: root + command: 'bash {{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword={{ apigee_repo_password }} apigeerepohost={{ apigee_repo_uri | default(default_apigee_repo_uri) }} apigeeprotocol={{ apigee_repo_protocol | default(default_apigee_repo_protocol) }}:// JAVA_FIX=C' + args: + creates: '{{ apigee_home }}/apigee-service/bin/apigee-service' + env: + JAVA_HOME: '{{ java_home }}' + failed_when: results is defined and results.rc is defined and results.rc > 0 or results | failed + register: results + when: apigee_stage is not defined and opdk_debug_mode is not defined or opdk_debug_mode | trim | lower == 'off' + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + when: (apigee_repo_uri is defined and apigee_repo_uri | trim | length > 0) - block: @@ -91,4 +122,21 @@ no_proxy: "{{ no_proxy }}" http_proxy: "{{ http_proxy }}" https_proxy: "{{ https_proxy }}" + rescue: + - name: Install bootstrap from development repositories with proxy + become: yes + become_user: root + command: 'bash {{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword={{ apigee_repo_password }} apigeestage={{ apigee_stage }} apigeerepohost={{ apigee_repo_uri | default(default_apigee_repo_uri) }} apigeeprotocol={{ apigee_repo_protocol | default(default_apigee_repo_protocol) }}:// JAVA_FIX=C' + args: + creates: '{{ apigee_home }}/apigee-service/bin/apigee-service' + env: + JAVA_HOME: '{{ java_home }}' + failed_when: results is defined and results.rc is defined and results.rc > 0 or results | failed + register: results + when: apigee_stage is defined and opdk_debug_mode is not defined or opdk_debug_mode | trim | lower == 'off' + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + when: apigee_stage is defined or apigee_stage | trim | length > 0