mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
6ae04017d8
commit
61743ab39a
1 changed files with 2 additions and 8 deletions
|
@ -208,20 +208,14 @@ def main():
|
||||||
|
|
||||||
p = module.params
|
p = module.params
|
||||||
|
|
||||||
force_yes = p['force']
|
|
||||||
no_recommends_yes = p['no_recommends']
|
|
||||||
root = p['root']
|
|
||||||
|
|
||||||
if p['update_cache']:
|
if p['update_cache']:
|
||||||
update_package_db(module)
|
update_package_db(module)
|
||||||
|
|
||||||
packages = p['package']
|
|
||||||
|
|
||||||
if p['state'] in ['installed', 'present']:
|
if p['state'] in ['installed', 'present']:
|
||||||
install_packages(module, packages, root, force_yes, no_recommends_yes)
|
install_packages(module, p['name'], p['root'], p['force'], p['no_recommends'])
|
||||||
|
|
||||||
elif p['state'] in ['removed', 'absent']:
|
elif p['state'] in ['removed', 'absent']:
|
||||||
remove_packages(module, packages, root)
|
remove_packages(module, p['name'], p['root'])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue