mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.3 KiB
YAML
92 lines
2.3 KiB
YAML
5 years ago
|
---
|
||
|
- name: test site exists, but stopped in case of duplicate web binding
|
||
|
win_iis_website:
|
||
|
name: "{{ test_site_name }}"
|
||
|
state: stopped
|
||
|
physical_path: 'C:\inetpub\wwwroot'
|
||
|
|
||
|
- name: test app is absent (baseline)
|
||
|
win_iis_webapplication:
|
||
|
state: absent
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
|
||
|
- name: create test app
|
||
|
win_iis_webapplication:
|
||
|
state: present
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
physical_path: "{{ test_physical_path }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
- 'result.physical_path == test_physical_path'
|
||
|
|
||
|
- name: create test app (idempotent)
|
||
|
win_iis_webapplication:
|
||
|
state: present
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
physical_path: "{{ test_physical_path }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == false'
|
||
|
- 'result.physical_path == test_physical_path'
|
||
|
|
||
|
- name: set test app credentials
|
||
|
win_iis_webapplication:
|
||
|
state: present
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
connect_as: specific_user
|
||
|
username: "{{ test_user }}"
|
||
|
password: "{{ test_password }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
- 'result.physical_path == test_physical_path'
|
||
|
- "result.connect_as == 'specific_user'"
|
||
|
|
||
|
- name: set test app credentials (idempotent)
|
||
|
win_iis_webapplication:
|
||
|
state: present
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
connect_as: specific_user
|
||
|
username: "{{ test_user }}"
|
||
|
password: "{{ test_password }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == false'
|
||
|
- 'result.physical_path == test_physical_path'
|
||
|
- "result.connect_as == 'specific_user'"
|
||
|
|
||
|
- name: create new test application pool
|
||
|
win_iis_webapppool:
|
||
|
name: "{{ test_apppool }}"
|
||
|
state: present
|
||
|
|
||
|
- name: change app pool and use pass through authentication
|
||
|
win_iis_webapplication:
|
||
|
state: present
|
||
|
site: "{{ test_site_name }}"
|
||
|
name: "{{ test_app_name }}"
|
||
|
connect_as: pass_through
|
||
|
application_pool: "{{ test_apppool }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
- 'result.physical_path == test_physical_path'
|
||
|
- "result.connect_as == 'pass_through'"
|
||
|
- "result.application_pool == test_apppool"
|