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
fadf02d0
Commit
fadf02d0
authored
Jun 08, 2014
by
Casey Fitzpatrick
Committed by
James Cammarata
Jun 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for svr4pkg module failure reporting, issue #7645
parent
3ebecdd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
library/packaging/svr4pkg
+11
-3
No files found.
library/packaging/svr4pkg
View file @
fadf02d0
...
@@ -152,7 +152,7 @@ def package_install(module, name, src, proxy, response_file, zone, category):
...
@@ -152,7 +152,7 @@ def package_install(module, name, src, proxy, response_file, zone, category):
os
.
unlink
(
adminfile
)
os
.
unlink
(
adminfile
)
return
(
rc
,
out
,
err
)
return
(
rc
,
out
,
err
)
def
package_uninstall
(
module
,
name
,
src
):
def
package_uninstall
(
module
,
name
,
src
,
category
):
adminfile
=
create_admin_file
()
adminfile
=
create_admin_file
()
if
category
:
if
category
:
cmd
=
[
'pkgrm'
,
'-na'
,
adminfile
,
'-Y'
,
name
]
cmd
=
[
'pkgrm'
,
'-na'
,
adminfile
,
'-Y'
,
name
]
...
@@ -209,10 +209,18 @@ def main():
...
@@ -209,10 +209,18 @@ def main():
(
rc
,
out
,
err
)
=
package_uninstall
(
module
,
name
,
src
,
category
)
(
rc
,
out
,
err
)
=
package_uninstall
(
module
,
name
,
src
,
category
)
out
=
out
[:
75
]
out
=
out
[:
75
]
if
rc
is
None
:
#Success,Warning,Interruption,Reboot all,Reboot this return codes
if
rc
is
0
or
rc
is
2
or
rc
is
3
or
rc
is
10
or
rc
is
20
:
result
[
'changed'
]
=
True
#no install nor uninstall, or failed
else
:
result
[
'changed'
]
=
False
result
[
'changed'
]
=
False
#Fatal error,Administration,Administration Interaction return codes
if
rc
is
1
or
rc
is
4
or
rc
is
5
:
result
[
'failed'
]
=
True
else
:
else
:
result
[
'changed'
]
=
Tru
e
result
[
'failed'
]
=
Fals
e
if
out
:
if
out
:
result
[
'stdout'
]
=
out
result
[
'stdout'
]
=
out
...
...
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