blob: c2926fa062310d6893734c544c8ab650b7e4b9ea [file]
---
# tasks file for opdk-setup-bootstrap
- name: Download bootstrap
bootstrap:
dest_dir: '{{ opdk_installer_path }}'
version: '{{ opdk_version }}'
url: '{{ apigee_repo_url }}'
user_name: '{{ apigee_repo_user }}'
password: '{{ apigee_repo_password }}'
register: results
- name: Set bootstrap file ownership
file:
path: '{{ bootstrap_script }}'
owner: '{{ opdk_user_name }}'
group: '{{ opdk_group_name }}'
- name: Fail the playbook if bootstrap fails to install
fail:
msg: 'Bootstrap installation failed, no point in letting this go further'
when: results | failed
- name: Install bootstrap
shell: "bash {{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword='{{ apigee_repo_password }}' JAVA_FIX=C"
args:
creates: '{{ apigee_installation_home }}/apigee-service/bin/apigee-service'
register: results
env:
JAVA_HOME: '{{ java_home }}'
failed_when: results is defined and results.rc is defined and results.rc > 0 or results | failed
when: apigee_repo_host is not defined
- name: Install bootstrap
shell: 'bash {{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword={{ apigee_repo_password }} apigeerepohost={{ apigee_repo_host }} JAVA_FIX=C'
args:
creates: '{{ apigee_installation_home }}/apigee-service/bin/apigee-service'
register: results
env:
JAVA_HOME: '{{ java_home }}'
failed_when: results is defined and results.rc is defined and results.rc > 0 or results | failed
when: apigee_repo_host is defined and apigee_stage is not defined
- name: Install bootstrap
shell: 'bash {{ bootstrap_script }} apigeeuser={{ apigee_repo_user }} apigeepassword={{ apigee_repo_password }} apigeestage={{ apigee_stage }} apigeerepohost={{ apigee_repo_host }} JAVA_FIX=C'
args:
creates: '{{ apigee_installation_home }}/apigee-service/bin/apigee-service'
register: results
env:
JAVA_HOME: '{{ java_home }}'
failed_when: results is defined and results.rc is defined and results.rc > 0 or results | failed
when: apigee_repo_host is defined and apigee_stage is defined
- name: Set Apigee directory ownership
file:
path: '{{ item }}'
owner: '{{ opdk_user_name }}'
group: '{{ opdk_user_name }}'
recurse: yes
with_items:
- /opt/apigee
- /opt/nginx