1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixup apt module refactoring from previous patch.

This commit is contained in:
Michael DeHaan 2013-04-23 09:38:32 -04:00
parent bd0c22868e
commit f36e85efbb

View file

@ -154,7 +154,7 @@ def install(m, pkgspec, cache, upgrade=False, default_release=None, install_reco
else: else:
force_yes = '' 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: if default_release:
cmd += " -t '%s'" % (default_release,) cmd += " -t '%s'" % (default_release,)
if not install_recommends: if not install_recommends:
@ -185,7 +185,7 @@ def remove(m, pkgspec, cache, purge=False):
purge = '' purge = ''
if purge: if purge:
purge = '--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: if m.check_mode:
m.exit_json(changed=True) m.exit_json(changed=True)
@ -234,7 +234,7 @@ def main():
default_release = dict(default=None, aliases=['default-release']), default_release = dict(default=None, aliases=['default-release']),
install_recommends = dict(default='yes', aliases=['install-recommends'], type='bool'), install_recommends = dict(default='yes', aliases=['install-recommends'], type='bool'),
force = dict(default='no', 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']], mutually_exclusive = [['package', 'upgrade']],
required_one_of = [['package', 'upgrade', 'update_cache']], required_one_of = [['package', 'upgrade', 'update_cache']],