Remove excess fact data from being returned to Ansible
The fact module returns ports and links, both of which are unusable in the ansible user context. It makes sense to strip them if they are present. Change-Id: I663804a8818fb02a8c188ddb7e8944ec1c4a008e
This commit is contained in:
parent
37180dff9c
commit
22945050ef
@ -127,6 +127,13 @@ def main():
|
||||
if item in facts:
|
||||
del facts[item]
|
||||
|
||||
# Remove ports and links as they are useless in the ansible
|
||||
# use context.
|
||||
if "ports" in facts:
|
||||
del facts["ports"]
|
||||
if "links" in facts:
|
||||
del facts["links"]
|
||||
|
||||
module.exit_json(changed=False, ansible_facts=facts)
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user