| --- |
| - name: Update cache with key and value |
| cache: |
| key: "{{ item.key }}" |
| value: "{{ item.value }}" |
| with_items: |
| - { key: "apigeerepobasepath", value: "{{ apigeerepobasepath }}" } |
| - { key: 'apigee_service', value: '{{ apigee_service }}' } |
| - { key: 'apigee_setup', value: '{{ apigee_setup }}' } |
| - { key: 'apigee_update', value: '{{ apigee_update }}' } |
| - { key: 'apigee_all', value: '{{ apigee_all }}' } |
| - { key: 'opdk_installer_path', value: '{{ opdk_installer_path }}' } |
| - { key: 'opdk_license_target_file_path', value: "{{ opdk_license_target_file_path }}" } |
| - { key: 'opdk_license_source_file_name', value: "{{ opdk_license_source_file_name }}" } |
| - { key: 'default_apigee_repo_user', value: '{{ default_apigee_repo_user }}' } |
| - { key: 'default_apigee_repo_password', value: '{{ default_apigee_repo_password}}' } |
| - { key: 'default_apigee_repo_uri', value: '{{ default_apigee_repo_uri }}' } |
| - { key: 'default_apigee_repo_protocol', value: '{{ default_apigee_repo_protocol }}' } |
| - { key: 'default_apigee_repo_url', value: '{{ default_apigee_repo_url }}' } |
| |
| # tasks file for apigee-opdk-setup-bootstrap |
| - name: Create installer path |
| file: |
| path: "{{ opdk_installer_path }}" |
| state: directory |
| owner: "{{ opdk_user_name }}" |
| group: "{{ opdk_group_name }}" |
| |
| - include_tasks: install-online.yml |
| when: install_archive_mirror is not defined |
| |
| - include_tasks: install-archive-mirror.yml |
| when: install_archive_mirror is defined and install_archive_mirror | bool == True |
| |
| - name: Validate that apigee-service exists |
| stat: |
| path: "{{ apigee_service }}" |
| register: apigee_service |
| |
| - name: Fail if apigee-service is not installed |
| fail: |
| msg: "Failing the playbook because apigee-service should be installed now and it was not installed" |
| when: not apigee_service.stat.exists |
| |
| |