mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
Merged in ITPLAT-476-cast-atl_startup_restart-to-bool (pull request #129)
ITPLAT-476 cast atl_startup_restart to bool Approved-by: Ben Partridge
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
atl_product_family: "jira"
|
||||
atl_product_edition: "jira-software"
|
||||
|
||||
atl_startup_enable: false
|
||||
atl_startup_restart: false
|
||||
ansible_vars_dump_location: "/tmp/ansible-vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Create systemd dir if necessary
|
||||
@@ -20,3 +19,20 @@
|
||||
|
||||
roles:
|
||||
- role: product_startup
|
||||
|
||||
post_tasks:
|
||||
- include_vars: ../../defaults/main.yml
|
||||
|
||||
# workaround Molecule idempotence check
|
||||
# normal pattern of setting changed_when allows file to be written twice, which takes extra time
|
||||
- name: Check if vars have already been dumped
|
||||
stat:
|
||||
path: "{{ ansible_vars_dump_location }}"
|
||||
register: ansible_vars_stat_result
|
||||
|
||||
- name: Dump vars to file for inspection
|
||||
copy:
|
||||
content: |
|
||||
{{ vars | to_nice_yaml }}
|
||||
dest: "{{ ansible_vars_dump_location }}"
|
||||
when: not ansible_vars_stat_result.stat.exists
|
||||
|
||||
@@ -13,3 +13,9 @@ def test_service_file(host):
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
||||
assert f.mode == 0o0640
|
||||
|
||||
|
||||
def test_atl_startup_restart(host):
|
||||
f = host.file('/tmp/ansible-vars.yml')
|
||||
# value should appear as YAML boolean true (i.e., string 'true' will fail)
|
||||
assert f.contains(r'^\s*atl_startup_restart: true$')
|
||||
|
||||
Reference in New Issue
Block a user