Skip to content

Commit

Permalink
Adds verify steps for Molecule
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Jan 23, 2024
1 parent 00254bc commit ae140de
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 0 deletions.
35 changes: 35 additions & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Verify
hosts: all
tasks:

- name: Retrieve information from path

Check failure on line 6 in molecule/default/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).

Check failure on line 6 in molecule/default/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).
stat:
path: /root/.wine/drive_c/Program Files/MetaTrader 5
register: stat_result

- name: Verify platform exist

Check failure on line 11 in molecule/default/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).

Check failure on line 11 in molecule/default/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).
assert:
that:
- stat_result.stat.exists
- stat_result.stat.isdir

- name: Check if Meta Terminal exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: terminal*.exe
recurse: true
register: find_mt_res
when: ansible_os_family != "Windows"

- name: Check if Meta Editor exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: metaeditor*.exe
recurse: true
register: find_mte_res
when: ansible_os_family != "Windows"
35 changes: 35 additions & 0 deletions molecule/mt4/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Verify
hosts: all
tasks:

- name: Retrieve information from path

Check failure on line 6 in molecule/mt4/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).

Check failure on line 6 in molecule/mt4/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).
stat:
path: /root/.wine/drive_c/Program Files
register: stat_result

- name: Verify Program Files exist

Check failure on line 11 in molecule/mt4/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).

Check failure on line 11 in molecule/mt4/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).
assert:
that:
- stat_result.stat.exists
- stat_result.stat.isdir

- name: Check if Meta Terminal exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: terminal*.exe
recurse: true
register: find_mt_res
when: ansible_os_family != "Windows"

- name: Check if Meta Editor exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: metaeditor*.exe
recurse: true
register: find_mte_res
when: ansible_os_family != "Windows"
35 changes: 35 additions & 0 deletions molecule/mt5/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Verify
hosts: all
tasks:

- name: Retrieve information from path

Check failure on line 6 in molecule/mt5/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).

Check failure on line 6 in molecule/mt5/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (stat).
stat:
path: /root/.wine/drive_c/Program Files/MetaTrader 5
register: stat_result

- name: Verify platform exist

Check failure on line 11 in molecule/mt5/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).

Check failure on line 11 in molecule/mt5/verify.yml

View workflow job for this annotation

GitHub Actions / Pre-commit

fqcn[action-core]

Use FQCN for builtin module actions (assert).
assert:
that:
- stat_result.stat.exists
- stat_result.stat.isdir

- name: Check if Meta Terminal exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: terminal*.exe
recurse: true
register: find_mt_res
when: ansible_os_family != "Windows"

- name: Check if Meta Editor exists
changed_when: false
failed_when: find_mt_res.matched == 0
ansible.builtin.find:
paths: '{{ ansible_env.HOME }}/.wine/drive_c'
patterns: metaeditor*.exe
recurse: true
register: find_mte_res
when: ansible_os_family != "Windows"

0 comments on commit ae140de

Please sign in to comment.