Debian Codegraph @

ansible_collections/microsoft/iis/tests/integration/targets/website_info/tasks/main.yml

raw symbols SCIP
1 ---
2 - name: run website_info integration tests
3 block:
4 - name: create website directory structure
5 ansible.windows.win_file:
6 path: "{{ item }}"
7 state: directory
8 loop:
9 - "{{ test_phisical_path }}"
10 - "{{ test_alt_phisical_path }}"
11
12 - name: get all websites
13 microsoft.iis.website_info:
14 register: websites
15
16 - name: remove all websites
17 microsoft.iis.website:
18 name: "{{ item.name }}"
19 state: absent
20 loop: "{{ websites.site }}"
21
22 - name: get website info with no websites present
23 microsoft.iis.website_info:
24 register: website_no_sites
25
26 - name: assert get website info with no websites present
27 ansible.builtin.assert:
28 that:
29 - website_no_sites is not changed
30 - website_no_sites.exists == False
31 - website_no_sites.site | length == 0
32
33 - name: create test application pool
34 microsoft.iis.web_app_pool:
35 name: "{{ item }}"
36 state: present
37 loop:
38 - "{{ test_apppool }}"
39 - "{{ test_alt_apppool }}"
40
41 # Tests
42 - include_tasks: tests.yml
43
44 always:
45 # Cleanup
46 - name: remove test website
47 microsoft.iis.website:
48 name: "{{ item }}"
49 state: absent
50 loop:
51 - "{{ test_website_name }}"
52 - "{{ test_alt_website_name }}"
53
54 - name: remove test application pool
55 microsoft.iis.web_app_pool:
56 name: "{{ item }}"
57 state: absent
58 loop:
59 - "{{ test_phisical_path }}"
60 - "{{ test_alt_phisical_path }}"
61
62 - name: remove website directory structure
63 ansible.windows.win_file:
64 path: "{{ item }}"
65 state: absent
66 loop:
67 - "{{ test_phisical_path }}"
68 - "{{ test_alt_phisical_path }}"