Skip to content

Commit

Permalink
Refactor output verification task
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Nov 3, 2023
1 parent 505b0f0 commit 187536b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions molecule/common/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
_service: heartbeat-elastic.service
when: services[_service].status != "enabled"

- name: Stat output filename
- name: Verify output file
ansible.builtin.stat:
path: "{{ heartbeat_conf.output.file.path }}/{{ heartbeat_conf.output.file.filename }}"
register: _output_file

- name: Verify output file
ansible.builtin.fail:
msg: "Output file {{ heartbeat_conf.output.file.filename}} not found"
when: not _output_file.stat.exists
retries: 4
delay: 35
failed_when: not _output_file.stat.exists

0 comments on commit 187536b

Please sign in to comment.