updated proxy config
diff --git a/tasks/4150703-main.yml b/tasks/4150703-main.yml deleted file mode 100644 index 89be8a7..0000000 --- a/tasks/4150703-main.yml +++ /dev/null
@@ -1,82 +0,0 @@ ---- -- name: Get user status - uri: - url: 'http://{{ local_address }}:{{ ms_ext_mgmt_port }}/v1/users/{{ opdk_user_email }}' - user: '{{ admin_user }}' - password: '{{ admin_pass }}' - body_format: json - force_basic_auth: yes - register: user_results - -- name: User Status Report - debug: - var: user_results - -- name: Create user - shell: "{{ create_user }} -P {{ admin_pass }} -u {{ opdk_user_email }} -p {{ opdk_user_pass }} -f {{ first_name }} -l {{ last_name }}" - when: not user_results.status == 200 - register: user_create_results - -- name: Create user report - debug: - var: user_create_results - -- name: Get org status - uri: - url: 'http://{{ local_address }}:{{ ms_ext_mgmt_port }}/v1/organizations/{{ org_name }}' - user: '{{ admin_user }}' - password: '{{ admin_pass }}' - body_format: json - force_basic_auth: yes - register: org_results - ignore_errors: true - -- name: Org status report - debug: - var: org_results - -- name: Create an organization - shell: "{{ create_org }} -a {{ opdk_user_email }} -o {{ org_name }} -P {{ admin_pass }}" - when: not org_results.status == 200 - register: create_status - -- name: Create organization status - debug: - var: create_status - -- name: Create roles - shell: "{{ create_roles }} -o {{ org_name }} -P {{ admin_pass }}" - when: not org_results.status == 200 - register: create_role - -- name: Create roles status report - debug: - var: create_role - -- name: Get environment status - uri: - url: 'http://{{ local_address }}:{{ ms_ext_mgmt_port }}/v1/organizations/{{ org_name }}/environments/{{ env_name }}' - user: '{{ admin_user }}' - password: '{{ admin_pass }}' - body_format: json - force_basic_auth: yes - register: env_results - ignore_errors: true - -- name: Environment status report - debug: - var: env_results - -- name: Print name of virtual_host_alias - debug: - msg: "virtual_host_alias: {{ virtual_host_alias }}" - -- name: Add an environment - shell: "{{ add_env }} -o {{ org_name }} -e {{ env_name }} -P {{ admin_pass }} -A -v {{ virtual_host_name }} -p {{ virtual_host_port }} -a {{ virtual_host_alias }}" - when: not env_results.status == 200 - ignore_errors: true - register: add_env_status - -- name: Add environment status report - debug: - var: add_env_status
diff --git a/tasks/main.yml b/tasks/main.yml index fc42982..55dff7d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -17,8 +17,8 @@ msg: "Management server is not running" when: ms_ext_mgmt_port_status | failed -- include: 4150703-main.yml - when: opdk_version | version_compare('4.16.01', '<') +- include: with_no_proxy.yml + when: http_proxy is not defined and https_proxy is not defined -- include: 4160100-main.yml - when: opdk_version | version_compare('4.16.01', '>=') +- include: with_proxy.yml + when: http_proxy is defined and https_proxy is defined
diff --git a/tasks/4160100-main.yml b/tasks/with_no_proxy.yml similarity index 100% rename from tasks/4160100-main.yml rename to tasks/with_no_proxy.yml
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml new file mode 100644 index 0000000..e40e4f8 --- /dev/null +++ b/tasks/with_proxy.yml
@@ -0,0 +1,30 @@ +--- +- name: Obtain apigee-provision status + stat: + path: '{{ apigee_provision_dir }}' + register: apigee_provision_status + +- name: Ensure apigee-provision is current by uninstalling this first + ignore_errors: yes + shell: '{{ apigee_service }} apigee-provision install' + when: not apigee_provision_status.stat.exists + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + +- name: Apigee provision installation + shell: '{{ apigee_service }} apigee-provision install' + when: not apigee_provision_status.stat.exists + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + +- name: Apigee organization setup + shell: '{{ apigee_service }} apigee-provision setup-org -f {{ onboarding_config_file_path }}' + ignore_errors: yes + environment: + no_proxy: "{{ no_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}"