1- name: Create a broken symbolic link
2  file:
3    src: does_not_exist
4    dest: link_to_nonexistent_file
5    state: link
6    force: yes
7    follow: no
8
9- name: Assert directory tests work
10  assert:
11    that:
12      - "'.' is is_dir"  # old name
13      - "'.' is directory"
14      - "'does_not_exist' is not directory"
15
16- name: Assert file tests work
17  assert:
18    that:
19      - "(role_path + '/aliases') is is_file"  # old name
20      - "(role_path + '/aliases') is file"
21      - "'does_not_exist' is not file"
22
23- name: Assert link tests work
24  assert:
25    that:
26      - "'link_to_nonexistent_file' is link"
27      - "'.' is not link"
28
29- name: Assert exists tests work
30  assert:
31    that:
32      - "(role_path + '/aliases') is exists"
33      - "'link_to_nonexistent_file' is not exists"
34
35- name: Assert link_exists tests work
36  assert:
37    that:
38      - "'link_to_nonexistent_file' is link_exists"
39      - "'does_not_exist' is not link_exists"
40
41- name: Assert abs tests work
42  assert:
43    that:
44      - "'/' is is_abs"  # old name
45      - "'/' is abs"
46      - "'../' is not abs"
47
48- name: Assert same_file tests work
49  assert:
50    that:
51      - "'/' is is_same_file('/')"  # old name
52      - "'/' is same_file('/')"
53      - "'/' is not same_file(role_path + '/aliases')"
54
55- name: Assert mount tests work
56  assert:
57    that:
58      - "'/' is is_mount"  # old name
59      - "'/' is mount"
60      - "'/does_not_exist' is not mount"
61