mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
mark repo not enabled when pkgrepo state passes in disable: True
This commit is contained in:
parent
282be7ba5a
commit
2f2ebb7bb6
1 changed files with 5 additions and 0 deletions
|
@ -1857,6 +1857,11 @@ def mod_repo(repo, basedir=None, **kwargs):
|
|||
'Only one of \'mirrorlist\' and \'baseurl\' can be specified'
|
||||
)
|
||||
|
||||
if 'disabled' in repo_opts:
|
||||
kw_disabled = repo_opts['disabled']
|
||||
if kw_disabled is True or str(kw_disabled).lower() == 'true':
|
||||
repo_opts['enabled'] = 0
|
||||
|
||||
# Build a list of keys to be deleted
|
||||
todelete = []
|
||||
for key in repo_opts:
|
||||
|
|
Loading…
Add table
Reference in a new issue