Files
dc-deployments-automation/roles/product_startup/molecule/default/converge.yml

39 lines
1021 B
YAML

---
- name: Converge
hosts: all
vars:
atl_product_user: "jira"
atl_product_family: "jira"
atl_product_edition: "jira-software"
ansible_vars_dump_location: "/tmp/ansible-vars.yml"
pre_tasks:
- name: Create systemd dir if necessary
file:
path: "{{ item }}"
state: directory
with_items:
- '/usr/lib/systemd/system/'
- '/lib/systemd/system/'
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