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
19d6f4d1
Commit
19d6f4d1
authored
Jun 09, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '7645' of
https://github.com/kcghost/ansible
into kcghost-7645
parents
989e4770
fdbb77da
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 @
19d6f4d1
...
@@ -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