Move bool coerce up to initialisation.

This commit is contained in:
Steve Smith
2021-01-22 12:26:08 +11:00
parent 7c23b7f478
commit 2a67095acc
5 changed files with 9 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
atl_product_family: "jira"
atl_product_user: "jira"
atl_product_edition: "jira-{{ lookup('env', 'ATL_PRODUCT_EDITION') | lower }}"
atl_install_jsd_as_obr: "{{ lookup('env', 'ATL_JSD_ASOBR') }}"
atl_install_jsd_as_obr: "{{ lookup('env', 'ATL_JSD_ASOBR') | bool }}"
atl_systemd_service_name: "jira.service"
atl_startup_systemd_params:

View File

@@ -36,6 +36,7 @@ atl_servicedesk_url_map:
default: "{{ atl_servicedesk_versioned_url }}"
atl_servicedesk_metadata_url: "{{ atl_servicedesk_url_map[atl_product_version] | default(atl_servicedesk_url_map['default']) }}"
atl_install_jsd_as_obr: false
atl_servicedesk_download_file: "{{ atl_installer_temp }}/jira-servicedesk.{{ atl_product_version }}.obr"
force_version_update: false

View File

@@ -35,3 +35,7 @@ def test_completed_lockfile(host):
lockfile = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin_completed')
assert lockfile.exists
assert lockfile.user == 'root'
def test_servicedesk_not_installed(host):
jars = host.file('/media/atl/jira/shared/plugins/installed-plugins')
assert len(list(filter(lambda p: 'servicedesk' in p, jars))) == 0

View File

@@ -267,6 +267,4 @@
- name: Include if jsd is requested to be installed from OBR
include_tasks: "jira-servicedesk_as_obr.yml"
when:
- atl_install_jsd_as_obr is defined
- atl_install_jsd_as_obr | bool
when: atl_install_jsd_as_obr

View File

@@ -2,7 +2,7 @@
# Mostly for molecule testing, as skip-tags doesn't work with handlers.
atl_startup_enable: true
atl_startup_restart: "{{ lookup('env', 'ATL_STARTUP_RESTART') or true }}"
atl_startup_restart: "{{ lookup('env', 'ATL_STARTUP_RESTART') | default(true) | bool }}"
atl_startup_script_map:
jira: "bin/start-jira.sh"