Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1e418fe5
Commit
1e418fe5
authored
May 29, 2015
by
Chris Church
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only run win_feature tests when the host has the ServerManager module.
parent
ac14ad14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
test/integration/roles/test_win_feature/tasks/main.yml
+18
-0
No files found.
test/integration/roles/test_win_feature/tasks/main.yml
View file @
1e418fe5
...
@@ -17,10 +17,16 @@
...
@@ -17,10 +17,16 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
name
:
check whether servermanager module is available (windows 2008 r2 or later)
raw
:
PowerShell -Command Import-Module ServerManager
register
:
win_feature_has_servermanager
ignore_errors
:
true
-
name
:
start with feature absent
-
name
:
start with feature absent
win_feature
:
win_feature
:
name
:
"
{{
test_win_feature_name
}}"
name
:
"
{{
test_win_feature_name
}}"
state
:
absent
state
:
absent
when
:
win_feature_has_servermanager|success
-
name
:
install feature
-
name
:
install feature
win_feature
:
win_feature
:
...
@@ -30,6 +36,7 @@
...
@@ -30,6 +36,7 @@
include_sub_features
:
yes
include_sub_features
:
yes
include_management_tools
:
yes
include_management_tools
:
yes
register
:
win_feature_install_result
register
:
win_feature_install_result
when
:
win_feature_has_servermanager|success
-
name
:
check result of installing feature
-
name
:
check result of installing feature
assert
:
assert
:
...
@@ -45,6 +52,7 @@
...
@@ -45,6 +52,7 @@
-
"
win_feature_install_result.feature_result[0].restart_needed
is
defined"
-
"
win_feature_install_result.feature_result[0].restart_needed
is
defined"
-
"
win_feature_install_result.feature_result[0].skip_reason"
-
"
win_feature_install_result.feature_result[0].skip_reason"
-
"
win_feature_install_result.feature_result[0].success
is
defined"
-
"
win_feature_install_result.feature_result[0].success
is
defined"
when
:
win_feature_has_servermanager|success
-
name
:
install feature again
-
name
:
install feature again
win_feature
:
win_feature
:
...
@@ -54,6 +62,7 @@
...
@@ -54,6 +62,7 @@
include_sub_features
:
yes
include_sub_features
:
yes
include_management_tools
:
yes
include_management_tools
:
yes
register
:
win_feature_install_again_result
register
:
win_feature_install_again_result
when
:
win_feature_has_servermanager|success
-
name
:
check result of installing feature again
-
name
:
check result of installing feature again
assert
:
assert
:
...
@@ -63,12 +72,14 @@
...
@@ -63,12 +72,14 @@
-
"
win_feature_install_again_result.exitcode
==
'NoChangeNeeded'"
-
"
win_feature_install_again_result.exitcode
==
'NoChangeNeeded'"
-
"
not
win_feature_install_again_result.restart_needed"
-
"
not
win_feature_install_again_result.restart_needed"
-
"
win_feature_install_again_result.feature_result
==
[]"
-
"
win_feature_install_again_result.feature_result
==
[]"
when
:
win_feature_has_servermanager|success
-
name
:
remove feature
-
name
:
remove feature
win_feature
:
win_feature
:
name
:
"
{{
test_win_feature_name
}}"
name
:
"
{{
test_win_feature_name
}}"
state
:
absent
state
:
absent
register
:
win_feature_remove_result
register
:
win_feature_remove_result
when
:
win_feature_has_servermanager|success
-
name
:
check result of removing feature
-
name
:
check result of removing feature
assert
:
assert
:
...
@@ -84,12 +95,14 @@
...
@@ -84,12 +95,14 @@
-
"
win_feature_remove_result.feature_result[0].restart_needed
is
defined"
-
"
win_feature_remove_result.feature_result[0].restart_needed
is
defined"
-
"
win_feature_remove_result.feature_result[0].skip_reason"
-
"
win_feature_remove_result.feature_result[0].skip_reason"
-
"
win_feature_remove_result.feature_result[0].success
is
defined"
-
"
win_feature_remove_result.feature_result[0].success
is
defined"
when
:
win_feature_has_servermanager|success
-
name
:
remove feature again
-
name
:
remove feature again
win_feature
:
win_feature
:
name
:
"
{{
test_win_feature_name
}}"
name
:
"
{{
test_win_feature_name
}}"
state
:
absent
state
:
absent
register
:
win_feature_remove_again_result
register
:
win_feature_remove_again_result
when
:
win_feature_has_servermanager|success
-
name
:
check result of removing feature again
-
name
:
check result of removing feature again
assert
:
assert
:
...
@@ -99,6 +112,7 @@
...
@@ -99,6 +112,7 @@
-
"
win_feature_remove_again_result.exitcode
==
'NoChangeNeeded'"
-
"
win_feature_remove_again_result.exitcode
==
'NoChangeNeeded'"
-
"
not
win_feature_remove_again_result.restart_needed"
-
"
not
win_feature_remove_again_result.restart_needed"
-
"
win_feature_remove_again_result.feature_result
==
[]"
-
"
win_feature_remove_again_result.feature_result
==
[]"
when
:
win_feature_has_servermanager|success
-
name
:
try to install an invalid feature name
-
name
:
try to install an invalid feature name
win_feature
:
win_feature
:
...
@@ -106,6 +120,7 @@
...
@@ -106,6 +120,7 @@
state
:
present
state
:
present
register
:
win_feature_install_invalid_result
register
:
win_feature_install_invalid_result
ignore_errors
:
true
ignore_errors
:
true
when
:
win_feature_has_servermanager|success
-
name
:
check result of installing invalid feature name
-
name
:
check result of installing invalid feature name
assert
:
assert
:
...
@@ -114,6 +129,7 @@
...
@@ -114,6 +129,7 @@
-
"
not
win_feature_install_invalid_result|changed"
-
"
not
win_feature_install_invalid_result|changed"
-
"
win_feature_install_invalid_result.msg"
-
"
win_feature_install_invalid_result.msg"
-
"
win_feature_install_invalid_result.exitcode
==
'InvalidArgs'"
-
"
win_feature_install_invalid_result.exitcode
==
'InvalidArgs'"
when
:
win_feature_has_servermanager|success
-
name
:
try to remove an invalid feature name
-
name
:
try to remove an invalid feature name
win_feature
:
win_feature
:
...
@@ -121,6 +137,7 @@
...
@@ -121,6 +137,7 @@
state
:
absent
state
:
absent
register
:
win_feature_remove_invalid_result
register
:
win_feature_remove_invalid_result
ignore_errors
:
true
ignore_errors
:
true
when
:
win_feature_has_servermanager|success
-
name
:
check result of removing invalid feature name
-
name
:
check result of removing invalid feature name
assert
:
assert
:
...
@@ -129,3 +146,4 @@
...
@@ -129,3 +146,4 @@
-
"
not
win_feature_remove_invalid_result|changed"
-
"
not
win_feature_remove_invalid_result|changed"
-
"
win_feature_remove_invalid_result.msg"
-
"
win_feature_remove_invalid_result.msg"
-
"
win_feature_remove_invalid_result.exitcode
==
'InvalidArgs'"
-
"
win_feature_remove_invalid_result.exitcode
==
'InvalidArgs'"
when
:
win_feature_has_servermanager|success
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment