Module portinstall: use_packages is a bool (#47370)

The module has been checking if use_packages is
a string equal to "yes", but AnsibleModule actually
converts the use_packages argument to a bool.
This commit is contained in:
Ross Williams 2018-10-25 20:49:31 -04:00 committed by Jordan Borean
parent f7ba63e047
commit 300db3af84

View file

@ -163,7 +163,7 @@ def install_packages(module, packages, use_packages):
module.run_command("pkg install -y portupgrade")
portinstall_path = module.get_bin_path('portinstall', True)
if use_packages == "yes":
if use_packages:
portinstall_params = "--use-packages"
else:
portinstall_params = ""