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
f95786b5
Commit
f95786b5
authored
Feb 27, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6208 from jctanner/yum-rhn-fix
Fixes #6205 Add install_repoquery parameter to the yum module
parents
9a3891b6
aeccbeee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
library/packaging/yum
+17
-0
No files found.
library/packaging/yum
View file @
f95786b5
...
...
@@ -94,6 +94,7 @@ options:
default: "no"
choices: ["yes", "no"]
aliases: []
notes: []
# informational: requirements for nodes
requirements: [ yum, rpm ]
...
...
@@ -154,6 +155,17 @@ def yum_base(conf_file=None, cachedir=False):
return
my
def
install_yum_utils
(
module
):
if
not
module
.
check_mode
:
yum_path
=
module
.
get_bin_path
(
'yum'
)
if
yum_path
:
rc
,
so
,
se
=
module
.
run_command
(
'
%
s -y install yum-utils'
%
yum_path
)
if
rc
==
0
:
this_path
=
module
.
get_bin_path
(
'repoquery'
)
global
repoquery
repoquery
=
this_path
def
po_to_nevra
(
po
):
if
hasattr
(
po
,
'ui_nevra'
):
...
...
@@ -789,13 +801,18 @@ def main():
list
=
dict
(),
conf_file
=
dict
(
default
=
None
),
disable_gpg_check
=
dict
(
required
=
False
,
default
=
"no"
,
type
=
'bool'
),
# this should not be needed, but exists as a failsafe
install_repoquery
=
dict
(
required
=
False
,
default
=
"yes"
,
type
=
'bool'
),
),
required_one_of
=
[[
'name'
,
'list'
]],
mutually_exclusive
=
[[
'name'
,
'list'
]],
supports_check_mode
=
True
)
# this should not be needed, but exists as a failsafe
params
=
module
.
params
if
params
[
'install_repoquery'
]
and
not
repoquery
and
not
module
.
check_mode
:
install_yum_utils
(
module
)
if
params
[
'list'
]:
if
not
repoquery
:
...
...
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