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
069fa71d
Commit
069fa71d
authored
Jun 18, 2014
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded code, document creates param and ensure creates only affects state=present
parent
5d7f6756
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
library/windows/win_msi
+6
-1
library/windows/win_msi.ps1
+1
-9
No files found.
library/windows/win_msi
View file @
069fa71d
...
...
@@ -27,7 +27,8 @@ module: win_msi
version_added: "1.7"
short_description: Installs and uninstalls Windows MSI files
description:
- Installs or uninstalls a Windows MSI file that is already located on the target server
- Installs or uninstalls a Windows MSI file that is already located on the
target server
options:
path:
description:
...
...
@@ -40,6 +41,10 @@ options:
- present
- absent
default: present
creates:
description:
- Path to a file created by installing the MSI to prevent from
attempting to reinstall the package on every run
author: Matt Martz
'''
...
...
library/windows/win_msi.ps1
View file @
069fa71d
...
...
@@ -35,7 +35,7 @@ If ($params.extra_args.GetType)
$extra_args
=
$params
.extra_args;
}
If
(
$params
.creates.GetType
)
If
(
$params
.creates.GetType
-and
$params
.state.GetType -and
$params
.state -ne
"absent"
)
{
If
(
Test-File
$creates
)
{
...
...
@@ -44,8 +44,6 @@ If ($params.creates.GetType)
}
$logfile
=
[
IO.Path]::GetTempFileName
()
;
$stdoutfile
=
[
IO.Path]::GetTempFileName
()
;
$stderrfile
=
[
IO.Path]::GetTempFileName
()
;
if
(
$params
.state.GetType -and
$params
.state -eq
"absent"
)
{
msiexec.exe /x
$params
.path /qb /l
$logfile
$extra_args
;
...
...
@@ -59,13 +57,7 @@ Set-Attr $result "changed" $true;
$logcontents
=
Get-Content
$logfile
;
Remove-Item
$logfile
;
$stdoutcontents
=
Get-Content
$stdoutfile
;
Remove-Item
$stdoutfile
;
$stderrcontents
=
Get-Content
$stderrfile
;
Remove-Item
$stderrfile
;
Set
-Attr
$result
"log"
$logcontents
;
Set
-Attr
$result
"stdout"
$stdoutcontents
;
Set
-Attr
$result
"stderr"
$stderrcontents
;
Exit
-Json
$result
;
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