Skip to content

Commit cf20df2

Browse files
committed
Fix variable definition
1 parent afccdf0 commit cf20df2

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

playbooks/deploy.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
---
22
- name: Deploy Open Terms Archive applications
33
hosts: all
4-
vars:
5-
chromium_required: ota_apps_config['@opentermsarchive/engine'] is defined
6-
# Skip Debian 11 with ARM architecture as it is not currently supported by MongoDB; see https://www.mongodb.com/docs/manual/installation/#supported-platforms
7-
mongo_required: >
8-
( ansible_distribution != 'Debian' or (ansible_distribution == 'Debian' and ansible_facts['architecture'] != 'aarch64'))
9-
and (
10-
(ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type is defined and ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type == 'mongo') or
11-
(ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type is defined and ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type == 'mongo')
12-
)
13-
144
tasks:
155
- name: Load OTA applications configs
166
ansible.builtin.include_role:
@@ -19,6 +9,19 @@
199
vars:
2010
ota_apps_read_config_only: true
2111

12+
- name: Set required variables
13+
set_fact:
14+
chromium_required: "{{ ota_apps_config['@opentermsarchive/engine'] is defined }}"
15+
# Skip Debian 11 with ARM architecture as it is not currently supported by MongoDB; see https://www.mongodb.com/docs/manual/installation/#supported-platforms
16+
mongo_required:
17+
"{{
18+
(ansible_distribution != 'Debian' or (ansible_distribution == 'Debian' and ansible_facts['architecture'] != 'aarch64'))
19+
and (
20+
(ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type is defined and ota_apps_config['@opentermsarchive/engine'].recorder.versions.storage.type == 'mongo')
21+
or
22+
(ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type is defined and ota_apps_config['@opentermsarchive/engine'].recorder.snapshots.storage.type == 'mongo')
23+
) | bool
24+
}}"
2225
- name: Install infrastructure
2326
become: true
2427
tags: [infrastructure]

0 commit comments

Comments
 (0)