mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #2845 from robinsmidsrod/apt-confdef
Add option to apt-get calls to update unmodified config files
This commit is contained in:
commit
ef1f58cbbc
@ -204,8 +204,9 @@ def install(name=None, refresh=False, repo='', skip_verify=False,
|
||||
if kwargs.get(vkey) is not None:
|
||||
fname = '"{0}{1}{2}"'.format(fname, vsign, kwargs[vkey])
|
||||
break
|
||||
cmd = 'apt-get -q -y {confold} {verify} {target} install {pkg}'.format(
|
||||
cmd = 'apt-get -q -y {confold} {confdef} {verify} {target} install {pkg}'.format(
|
||||
confold='-o DPkg::Options::=--force-confold',
|
||||
confdef='-o DPkg::Options::=--force-confdef',
|
||||
verify='--allow-unauthenticated' if skip_verify else '',
|
||||
target='-t {0}'.format(repo) if repo else '',
|
||||
pkg=fname,
|
||||
@ -293,7 +294,7 @@ def upgrade(refresh=True, **kwargs):
|
||||
|
||||
ret_pkgs = {}
|
||||
old_pkgs = list_pkgs()
|
||||
cmd = 'apt-get -q -y -o DPkg::Options::=--force-confold dist-upgrade'
|
||||
cmd = 'apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef dist-upgrade'
|
||||
__salt__['cmd.run'](cmd)
|
||||
new_pkgs = list_pkgs()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user