Return a proper boolean True instead of a 'True' string

The type here is important, returning anything other than a boolean
has unintended consequences such as breaking Ansible callbacks because
they are expecting the "changed" field to be nothing other than a bool
by contract.

Change-Id: Ia9b4a749f64adae8969fd9ad66304d013013e056
This commit is contained in:
David Moreau Simard 2018-02-19 23:23:39 -05:00
parent 2b26488e9d
commit 571be25290
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ def main():
LOG.debug("Services: %s " % services)
if opts.ansible:
ansible_module.exit_json(changed='True', services=services)
ansible_module.exit_json(changed=True, services=services)
else:
if opts.mode == "services":
print(",".join(services))