added dev portal
diff --git a/defaults/main.yml b/defaults/main.yml index b68bcf6..92ea554 100644 --- a/defaults/main.yml +++ b/defaults/main.yml
@@ -90,10 +90,10 @@ opdk_license_source_file_name: '{{ local_apigee_secure }}/license.txt' # Apigee silent installation configuration file -opdk_installation_config_file: "{{ opdk_installer_path }}/edge-response.conf" +#opdk_installation_config_file: "{{ opdk_installer_path }}/edge-response.conf" -# Silent config file for portal -opdk_portal_config_file: '{{ opdk_installer_path }}/devportal-silent-install.conf' +## Silent config file for portal +#opdk_portal_config_file: '{{ opdk_installer_path }}/edge-devportal-response-{{ opdk_version }}-{{ region }}.conf' # Silent config file for portal opdk_portal_db_config_file: '{{ opdk_installer_path }}/devportal-postgres.conf'
diff --git a/tasks/main.yml b/tasks/main.yml index c5643a8..5e4236b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -17,3 +17,6 @@ - include_tasks: update_cache.yml - include_tasks: postgres.yml + +- include_tasks: region.yml +
diff --git a/tasks/region.yml b/tasks/region.yml new file mode 100644 index 0000000..30df261 --- /dev/null +++ b/tasks/region.yml
@@ -0,0 +1,20 @@ +--- +- name: Determine whether host is in Region 1 + set_fact: + region: 'dc-1' + when: groups['dc-1'] is defined and inventory_hostname in groups['dc-1'] + +- name: Determine whether host is in Region 2 + set_fact: + region: 'dc-2' + when: groups['dc-2'] is defined and inventory_hostname in groups['dc-2'] + +- name: Determine whether host is in Region 3 + set_fact: + region: 'dc-3' + when: groups['dc-3'] is defined and inventory_hostname in groups['dc-3'] + +- name: Add region to cache + cache: + key: "region" + value: "{{ region }}"
diff --git a/tasks/update_cache.yml b/tasks/update_cache.yml index 9e0fa5a..e33883a 100644 --- a/tasks/update_cache.yml +++ b/tasks/update_cache.yml
@@ -22,7 +22,7 @@ - { key: 'opdk_version', value: '{{ opdk_version }}' } - { key: 'apigee_mirror_version', value: '{{ apigee_mirror_version }}' } - { key: 'opdk_installer_path', value: '{{ opdk_installer_path }}' } - - { key: 'opdk_portal_config_file', value: '{{ opdk_portal_config_file }}' } +# - { key: 'opdk_portal_config_file', value: '{{ opdk_portal_config_file }}' } - { key: 'apigee_data_backup_archive_name', value: '{{ apigee_data_backup_archive_name }}' } - { key: 'apigee_archive_storage_folder', value: '{{ apigee_archive_storage_folder }}' } - { key: 'apigee_installation_home', value: '{{ apigee_installation_home }}' } @@ -37,7 +37,7 @@ - { key: 'opdk_license_target_file_path', value: "{{ opdk_license_target_file_path }}" } - { key: 'local_apigee_path', value: "{{ local_apigee_path }}" } - { key: 'opdk_license_source_file_name', value: "{{ opdk_license_source_file_name }}" } - - { key: 'opdk_installation_config_file', value: "{{ opdk_installation_config_file }}" } +# - { key: 'opdk_installation_config_file', value: "{{ opdk_installation_config_file }}" } - { key: 'apigee_postgresql_data_dir', value: "{{ apigee_postgresql_data_dir }}" } - { key: 'apigee_validate_config_file', value: "{{ apigee_validate_config_file }}" } - { key: 'default_apigee_repo_user', value: '{{ default_apigee_repo_user }}' }