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
5b852520
Commit
5b852520
authored
Jun 19, 2014
by
Chris Church
Committed by
Matt Martz
Jun 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for windows setup module.
parent
bceaf96f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
examples/scripts/upgrade_to_ps3.ps1
+2
-3
test/integration/roles/test_win_setup/tasks/main.yml
+35
-0
test/integration/test_winrm.yml
+1
-0
No files found.
examples/scripts/upgrade_to_ps3.ps1
View file @
5b852520
...
...
@@ -28,7 +28,6 @@ $powershellpath = "C:\powershell"
function
download-file
{
Get-Process
|
Out-File
c:\powershell\whatisrunningrightnow.txt
param
([
string
]
$path
,
[
string
]
$local
)
$client
=
new-object
system.net.WebClient
$client
.Headers.Add
(
"user-agent"
,
"PowerShell"
)
...
...
@@ -78,6 +77,6 @@ else
}
$FileName
=
$DownLoadUrl
.Split
(
'/'
)[
-1]
#
download-file $downloadurl "$powershellpath\$filename"
download-file
$downloadurl
"
$powershellpath
\
$filename
"
write-host
"
$powershellpath
\
$filename
"
.
"
$powershellpath
\
$filename
"
/quiet /log
"C:\powershell\install.log"
test/integration/roles/test_win_setup/tasks/main.yml
0 → 100644
View file @
5b852520
# test code for the setup module when using winrm connection
# (c) 2014, Chris Church <chris@ninemoreminutes.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
name
:
test setup module
action
:
setup
register
:
setup_result
-
name
:
check setup result
assert
:
that
:
-
"
not
setup_result|failed"
-
"
not
setup_result|changed"
-
"
setup_result.ansible_facts"
-
"
setup_result.ansible_facts.ansible_os_family
==
'Windows'"
-
"
setup_result.ansible_facts.ansible_distribution"
-
"
setup_result.ansible_facts.ansible_distribution_version"
-
"
setup_result.ansible_facts.ansible_fqdn"
-
"
setup_result.ansible_facts.ansible_hostname"
-
"
setup_result.ansible_facts.ansible_ip_addresses"
-
"
setup_result.ansible_facts.ansible_system"
test/integration/test_winrm.yml
View file @
5b852520
...
...
@@ -6,6 +6,7 @@
-
{
role
:
test_win_raw
,
tags
:
test_win_raw
}
-
{
role
:
test_win_script
,
tags
:
test_win_script
}
-
{
role
:
test_win_ping
,
tags
:
test_win_ping
}
-
{
role
:
test_win_setup
,
tags
:
test_win_setup
}
-
{
role
:
test_win_slurp
,
tags
:
test_win_slurp
}
-
{
role
:
test_win_fetch
,
tags
:
test_win_fetch
}
-
{
role
:
test_win_stat
,
tags
:
test_win_stat
}
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