mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28895 from rallytime/bp-28823
Back-port #28823 to 2015.8
This commit is contained in:
commit
64dc3c23e0
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,7 @@ HAS_ZYPP = False
|
|||
ZYPP_HOME = '/etc/zypp'
|
||||
LOCKS = '{0}/locks'.format(ZYPP_HOME)
|
||||
REPOS = '{0}/repos.d'.format(ZYPP_HOME)
|
||||
DEFAULT_PRIORITY = 99
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'pkg'
|
||||
|
@ -502,6 +503,12 @@ def mod_repo(repo, **kwargs):
|
|||
if kwargs.get('gpgautoimport') is True:
|
||||
cmd_opt.append('--gpg-auto-import-keys')
|
||||
|
||||
if 'priority' in kwargs:
|
||||
cmd_opt.append("--priority='{0}'".format(kwargs.get('priority', DEFAULT_PRIORITY)))
|
||||
|
||||
if 'humanname' in kwargs:
|
||||
cmd_opt.append("--name='{0}'".format(kwargs.get('humanname')))
|
||||
|
||||
if cmd_opt:
|
||||
__salt__['cmd.run'](('zypper -x mr {0} \'{1}\''.format(' '.join(cmd_opt), repo)),
|
||||
output_loglevel='trace')
|
||||
|
|
Loading…
Add table
Reference in a new issue