-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate win_iis_webapplication module to new microsoft.iis repository
- Loading branch information
Showing
5 changed files
with
470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shippable/windows/group3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test_iis_webapppool_name: TestPool |
43 changes: 43 additions & 0 deletions
43
tests/integration/targets/win_iis_webapppool/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Cannot use win_feature to install IIS on Server 2008. | ||
# Run a brief check and skip hosts that don't support | ||
# that operation | ||
- name: check if win_feature will work on test host | ||
ansible.windows.win_command: powershell.exe "Get-WindowsFeature" | ||
register: module_available | ||
failed_when: False | ||
|
||
# Run actual tests | ||
- block: | ||
- name: ensure IIS features are installed | ||
ansible.windows.win_feature: | ||
name: Web-Server | ||
state: present | ||
include_management_tools: True | ||
register: feature_install | ||
|
||
- name: reboot after feature install | ||
ansible.windows.win_reboot: | ||
when: feature_install.reboot_required | ||
|
||
- name: set version of IIS for tests | ||
win_file_version: | ||
path: C:\Windows\System32\inetsrv\w3wp.exe | ||
register: iis_version | ||
|
||
- name: ensure test pool is deleted as a baseline | ||
win_iis_webapppool: | ||
name: '{{test_iis_webapppool_name}}' | ||
state: absent | ||
|
||
# Tests | ||
- name: run tests on hosts that support it | ||
include_tasks: tests.yml | ||
|
||
always: | ||
# Cleanup | ||
- name: ensure test pool is deleted | ||
win_iis_webapppool: | ||
name: '{{test_iis_webapppool_name}}' | ||
state: absent | ||
when: module_available.rc == 0 |
Oops, something went wrong.