docker_host_info and docker_node: fix return variable names (#54172)

* docker_host_info: host_facts -> host_info

* docker_node: node_facts -> node
This commit is contained in:
Felix Fontein 2019-03-22 07:28:57 +01:00 committed by ansibot
parent d73db7f060
commit 946a16cc82
4 changed files with 66 additions and 66 deletions

View file

@ -132,7 +132,7 @@ EXAMPLES = '''
register: result
- debug:
var: result.docker_host_facts
var: result.host_info
'''
@ -143,7 +143,7 @@ can_talk_to_docker:
returned: both on success and on error
type: bool
host_facts:
host_info:
description:
- Facts representing the basic state of the docker host. Matches the C(docker system info) output.
returned: always
@ -209,7 +209,7 @@ class DockerHostManager(DockerBaseClass):
listed_objects = ['volumes', 'networks', 'containers', 'images']
self.results['host_facts'] = self.get_docker_host_facts()
self.results['host_info'] = self.get_docker_host_info()
if self.client.module.params['disk_usage']:
self.results['disk_usage'] = self.get_docker_disk_usage_facts()
@ -221,7 +221,7 @@ class DockerHostManager(DockerBaseClass):
filters = clean_dict_booleans_for_docker_api(client.module.params.get(filter_name))
self.results[returned_name] = self.get_docker_items_list(docker_object, filters)
def get_docker_host_facts(self):
def get_docker_host_info(self):
try:
return self.client.info()
except APIError as exc:

View file

@ -122,7 +122,7 @@ EXAMPLES = '''
'''
RETURN = '''
node_facts:
node:
description: Information about node after 'update' operation
returned: success
type: dict
@ -253,10 +253,10 @@ class SwarmNodeManager(DockerBaseClass):
node_spec=node_spec)
except APIError as exc:
self.client.fail("Failed to update node : %s" % to_native(exc))
self.results['node_facts'] = self.client.get_node_inspect(node_id=node_info['ID'])
self.results['node'] = self.client.get_node_inspect(node_id=node_info['ID'])
self.results['changed'] = changed
else:
self.results['node_facts'] = node_info
self.results['node'] = node_info
self.results['changed'] = changed