mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
mark repo not enabled when pkgrepo state passes in disable: True
This commit is contained in:
parent
282be7ba5a
commit
2f2ebb7bb6
@ -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…
Reference in New Issue
Block a user