|
|
|
@ -154,7 +154,7 @@ def install(m, pkgspec, cache, upgrade=False, default_release=None, install_reco
|
|
|
|
|
else:
|
|
|
|
|
force_yes = ''
|
|
|
|
|
|
|
|
|
|
cmd = "%s --option Dpkg::Options::=--force-confold -q -y %s install %s" % (APT_GET, force_yes, packages)
|
|
|
|
|
cmd = "%s --option Dpkg::Options::=--force-confold -q -y %s install %s" % (APT_GET_CMD, force_yes, packages)
|
|
|
|
|
if default_release:
|
|
|
|
|
cmd += " -t '%s'" % (default_release,)
|
|
|
|
|
if not install_recommends:
|
|
|
|
@ -185,7 +185,7 @@ def remove(m, pkgspec, cache, purge=False):
|
|
|
|
|
purge = ''
|
|
|
|
|
if purge:
|
|
|
|
|
purge = '--purge'
|
|
|
|
|
cmd = "%s -q -y %s remove %s" % (APT_GET, purge,packages)
|
|
|
|
|
cmd = "%s -q -y %s remove %s" % (APT_GET_CMD, purge,packages)
|
|
|
|
|
|
|
|
|
|
if m.check_mode:
|
|
|
|
|
m.exit_json(changed=True)
|
|
|
|
@ -234,7 +234,7 @@ def main():
|
|
|
|
|
default_release = dict(default=None, aliases=['default-release']),
|
|
|
|
|
install_recommends = dict(default='yes', aliases=['install-recommends'], type='bool'),
|
|
|
|
|
force = dict(default='no', type='bool'),
|
|
|
|
|
upgrade = dict(default='yes', choices=['yes', 'safe', 'full', 'dist'])
|
|
|
|
|
upgrade = dict(choices=['yes', 'safe', 'full', 'dist'])
|
|
|
|
|
),
|
|
|
|
|
mutually_exclusive = [['package', 'upgrade']],
|
|
|
|
|
required_one_of = [['package', 'upgrade', 'update_cache']],
|
|
|
|
|