def package_installed(module, package_name):
  """
  Determine if the package is already installed
  """
  cmd = ['pacman', '-Q', package_name]
  exit_code, _, _ = module.run_command(cmd, check_rc=False)
  return exit_code == 0