|
|
@ -1003,7 +1003,7 @@ def get_cache(module):
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
module = AnsibleModule(
|
|
|
|
module = AnsibleModule(
|
|
|
|
argument_spec=dict(
|
|
|
|
argument_spec=dict(
|
|
|
|
state=dict(type='str', default='present', choices=['absent', 'build-dep', 'installed', 'latest', 'present', 'removed', 'present', 'fixed']),
|
|
|
|
state=dict(type='str', default='present', choices=['absent', 'build-dep', 'fixed', 'latest', 'present']),
|
|
|
|
update_cache=dict(type='bool', aliases=['update-cache']),
|
|
|
|
update_cache=dict(type='bool', aliases=['update-cache']),
|
|
|
|
cache_valid_time=dict(type='int', default=0),
|
|
|
|
cache_valid_time=dict(type='int', default=0),
|
|
|
|
purge=dict(type='bool', default=False),
|
|
|
|
purge=dict(type='bool', default=False),
|
|
|
@ -1068,14 +1068,6 @@ def main():
|
|
|
|
autoremove = p['autoremove']
|
|
|
|
autoremove = p['autoremove']
|
|
|
|
autoclean = p['autoclean']
|
|
|
|
autoclean = p['autoclean']
|
|
|
|
|
|
|
|
|
|
|
|
# Deal with deprecated aliases
|
|
|
|
|
|
|
|
if p['state'] == 'installed':
|
|
|
|
|
|
|
|
module.deprecate("State 'installed' is deprecated. Using state 'present' instead.", version="2.9")
|
|
|
|
|
|
|
|
p['state'] = 'present'
|
|
|
|
|
|
|
|
if p['state'] == 'removed':
|
|
|
|
|
|
|
|
module.deprecate("State 'removed' is deprecated. Using state 'absent' instead.", version="2.9")
|
|
|
|
|
|
|
|
p['state'] = 'absent'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Get the cache object
|
|
|
|
# Get the cache object
|
|
|
|
cache = get_cache(module)
|
|
|
|
cache = get_cache(module)
|
|
|
|
|
|
|
|
|
|
|
|