mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
yum/dnf: Add download_dir param (#53171)
This commit is contained in:
parent
4ea51fd7ee
commit
239fb1f68d
6 changed files with 89 additions and 4 deletions
|
@ -197,6 +197,12 @@ options:
|
|||
type: bool
|
||||
default: "yes"
|
||||
version_added: "2.8"
|
||||
download_dir:
|
||||
description:
|
||||
- Specifies an alternate directory to store packages.
|
||||
- Has an effect only if I(download_only) is specified.
|
||||
type: str
|
||||
version_added: "2.8"
|
||||
notes:
|
||||
- When used with a `loop:` each package will be processed individually,
|
||||
it is much more efficient to pass the list directly to the `name` option.
|
||||
|
@ -1385,6 +1391,9 @@ class YumModule(YumDnf):
|
|||
if self.download_only:
|
||||
self.yum_basecmd.extend(['--downloadonly'])
|
||||
|
||||
if self.download_dir:
|
||||
self.yum_basecmd.extend(['--downloaddir=%s' % self.download_dir])
|
||||
|
||||
if self.installroot != '/':
|
||||
# do not setup installroot by default, because of error
|
||||
# CRITICAL:yum.cli:Config Error: Error accessing file for config file:////etc/yum.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue