mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
apk: Override system repositories (#32689)
Override system repositories when repository option is specified. This fixes inconsistencies when using check mode.
This commit is contained in:
parent
6aa95ce5fd
commit
760ea4b49e
1 changed files with 3 additions and 2 deletions
|
@ -40,7 +40,8 @@ options:
|
|||
default: null
|
||||
repository:
|
||||
description:
|
||||
- A package repository or multiple repositories
|
||||
- A package repository or multiple repositories.
|
||||
Unlike with the underlying apk command, this list will override the system repositories rather than supplement them.
|
||||
required: false
|
||||
default: null
|
||||
version_added: "2.4"
|
||||
|
@ -299,7 +300,7 @@ def main():
|
|||
# add repositories to the APK_PATH
|
||||
if p['repository']:
|
||||
for r in p['repository']:
|
||||
APK_PATH = "%s --repository %s" % (APK_PATH, r)
|
||||
APK_PATH = "%s --repository %s --repositories-file /dev/null" % (APK_PATH, r)
|
||||
|
||||
# normalize the state parameter
|
||||
if p['state'] in ['present', 'installed']:
|
||||
|
|
Loading…
Reference in a new issue