Merge pull request #434 from richm/fix-rhel_facts-issue

rhel_facts module must use keyword arguments

SUMMARY
The rhel_facts module must use keyword arguments.  The current
code gives this error:
Traceback (most recent call last):
...
  File "/tmp/ansible_ansible.posix.rhel_facts_payload_y10oy_4m/.../rhel_facts.py", line 72, in main
  TypeError: exit_json() takes 1 positional argument but 2 were given

The fix is to use all keyword arguments like other facts plugins.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ansible.posix.rhel_facts
ADDITIONAL INFORMATION
@maxamillion fyi

Reviewed-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
softwarefactory-project-zuul[bot] 2023-03-24 06:11:30 +00:00 committed by GitHub
commit ab94cc7294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- rhel_facts - Call exit_json with all keyword arguments

View file

@ -69,7 +69,7 @@ def main():
if os.path.exists("/run/ostree-booted"):
ansible_facts['pkg_mgr'] = 'ansible.posix.rhel_rpm_ostree'
module.exit_json(ansible_facts, changed=False)
module.exit_json(ansible_facts=ansible_facts, changed=False)
if __name__ == '__main__':