|
50 | 50 | apply: |
51 | 51 | tags: [always] |
52 | 52 | vars: |
53 | | - ota_apps_read_config_only: true |
| 53 | + ota_collection_read_config_only: true |
54 | 54 |
|
55 | 55 | - name: Set OTA collection variables |
56 | 56 | ansible.builtin.set_fact: |
57 | | - ota_chromium_required: "{{ ota_apps_config['@opentermsarchive/engine'] is defined }}" |
| 57 | + ota_chromium_required: "{{ ota_collection_config['@opentermsarchive/engine'] is defined }}" |
58 | 58 | ota_mongo_required: >- |
59 | 59 | {{ |
60 | 60 | (ansible_distribution != 'Debian' or (ansible_distribution == 'Debian' and ansible_facts['architecture'] != 'aarch64')) |
61 | 61 | and ( |
62 | | - (ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type is defined |
63 | | - and ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type == 'mongo') |
| 62 | + (ota_collection_config['@opentermsarchive/engine'].recorder.versions.storage.type is defined |
| 63 | + and ota_collection_config['@opentermsarchive/engine'].recorder.versions.storage.type == 'mongo') |
64 | 64 | or |
65 | | - (ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type is defined |
66 | | - and ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type == 'mongo') |
| 65 | + (ota_collection_config['@opentermsarchive/engine'].recorder.snapshots.storage.type is defined |
| 66 | + and ota_collection_config['@opentermsarchive/engine'].recorder.snapshots.storage.type == 'mongo') |
67 | 67 | ) | bool |
68 | 68 | }} |
69 | | - ota_snapshots_repository: "{{ ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.git.repository | default(None) }}" |
70 | | - ota_snapshots_relative_path: "{{ ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.git.path | default(None) }}" |
71 | | - ota_versions_repository: "{{ ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.git.repository | default(None) }}" |
72 | | - ota_versions_relative_path: "{{ ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.git.path | default(None) }}" |
73 | | - ota_collection_api_base_path: "{{ ota_apps_config['@opentermsarchive/engine']['collection-api'].basePath | default(None) }}" |
74 | | - ota_collection_api_port: "{{ ota_apps_config['@opentermsarchive/engine']['collection-api'].port | default(None) }}" |
| 69 | + ota_snapshots_repository: "{{ ota_collection_config['@opentermsarchive/engine'].recorder.snapshots.storage.git.repository | default(None) }}" |
| 70 | + ota_snapshots_relative_path: "{{ ota_collection_config['@opentermsarchive/engine'].recorder.snapshots.storage.git.path | default(None) }}" |
| 71 | + ota_versions_repository: "{{ ota_collection_config['@opentermsarchive/engine'].recorder.versions.storage.git.repository | default(None) }}" |
| 72 | + ota_versions_relative_path: "{{ ota_collection_config['@opentermsarchive/engine'].recorder.versions.storage.git.path | default(None) }}" |
| 73 | + ota_collection_api_base_path: "{{ ota_collection_config['@opentermsarchive/engine']['collection-api'].basePath | default(None) }}" |
| 74 | + ota_collection_api_port: "{{ ota_collection_config['@opentermsarchive/engine']['collection-api'].port | default(None) }}" |
75 | 75 | # Generic variables for pm2 and nginx |
76 | 76 | ota_app_directory: "{{ ota_directory }}" |
77 | 77 | ota_app_collection_id: "{{ ota_collection_id }}" |
78 | 78 | ota_app_pm2_home: "{{ ota_pm2_home }}" |
79 | 79 | ota_app_endpoints: |
80 | 80 | - name: "collection-api" |
81 | | - basePath: "{{ ota_apps_config['@opentermsarchive/engine']['collection-api'].basePath | default(None) }}" |
82 | | - port: "{{ ota_apps_config['@opentermsarchive/engine']['collection-api'].port | default(None) }}" |
| 81 | + basePath: "{{ ota_collection_config['@opentermsarchive/engine']['collection-api'].basePath | default(None) }}" |
| 82 | + port: "{{ ota_collection_config['@opentermsarchive/engine']['collection-api'].port | default(None) }}" |
83 | 83 |
|
84 | 84 | - name: Setup GitHub bot SSH key |
85 | 85 | ansible.builtin.include_role: |
|
97 | 97 | apply: |
98 | 98 | tags: [always] |
99 | 99 | vars: |
100 | | - ota_contribution_tool_apps_read_config_only: true |
| 100 | + ota_contribution_tool_read_config_only: true |
101 | 101 |
|
102 | 102 | - name: Set contribution-tool variables |
103 | 103 | ansible.builtin.set_fact: |
|
125 | 125 | apply: |
126 | 126 | tags: [always] |
127 | 127 | vars: |
128 | | - ota_federation_api_apps_read_config_only: true |
| 128 | + ota_federation_api_read_config_only: true |
129 | 129 |
|
130 | 130 | - name: Set federation-api variables |
131 | 131 | ansible.builtin.set_fact: |
132 | 132 | ota_chromium_required: false |
133 | 133 | ota_mongo_required: false |
134 | | - ota_federation_api_port: "{{ ota_federation_api_apps_config['@opentermsarchive/federation-api'].port }}" |
135 | | - ota_federation_api_base_path: "{{ ota_federation_api_apps_config['@opentermsarchive/federation-api'].basePath }}" |
| 134 | + ota_federation_api_port: "{{ ota_federation_api_config['@opentermsarchive/federation-api'].port }}" |
| 135 | + ota_federation_api_base_path: "{{ ota_federation_api_config['@opentermsarchive/federation-api'].basePath }}" |
136 | 136 | # Generic variables for pm2 and nginx |
137 | 137 | ota_app_directory: "{{ ota_federation_api_directory }}" |
138 | 138 | ota_app_collection_id: "{{ ota_federation_api_collection_id }}" |
139 | 139 | ota_app_pm2_home: "{{ ota_federation_api_pm2_home }}" |
140 | 140 | ota_app_endpoints: |
141 | 141 | - name: "federation-api" |
142 | | - basePath: "{{ ota_federation_api_apps_config['@opentermsarchive/federation-api'].basePath }}" |
143 | | - port: "{{ ota_federation_api_apps_config['@opentermsarchive/federation-api'].port }}" |
| 142 | + basePath: "{{ ota_federation_api_config['@opentermsarchive/federation-api'].basePath }}" |
| 143 | + port: "{{ ota_federation_api_config['@opentermsarchive/federation-api'].port }}" |
144 | 144 |
|
145 | 145 | # Infrastructure installation (common) |
146 | 146 | - name: Install infrastructure |
|
235 | 235 | apply: |
236 | 236 | become: true |
237 | 237 | vars: |
238 | | - ota_nginx_collection_id: "{{ ota_app_collection_id }}" |
| 238 | + ota_nginx_app_id: "{{ ota_app_collection_id }}" |
239 | 239 | ota_nginx_endpoints: "{{ ota_app_endpoints }}" |
240 | 240 | ota_nginx_config_template: ./templates/nginx.conf.j2 |
241 | 241 | ota_nginx_reverse_proxy_config_template: ./templates/nginx-reverse-proxy-conf.j2 |
|
0 commit comments