Skip to content

Commit

Permalink
rename docker_info module to docker_facts
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Mar 10, 2017
1 parent 9ebc9c9 commit 43680e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ def main():
client.module.exit_json(
changed=False,
ansible_facts={
"docker_client": client,
"docker_facts": client.info(),
},
info=client.info(),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def run(self, tmp, task_vars):
# if running containerized installation check
# that available space is not below 5% instead
if is_containerized:
docker_info = self.module_executor("docker_info", {}, task_vars)
info = docker_info.get("info")
docker_facts = self.module_executor("docker_facts", {}, task_vars)
info = docker_facts.get("docker_facts")
status = dict(info.get("DriverStatus"))

if info.get("Driver", None) == self.supported_docker_dev_driver:
Expand Down Expand Up @@ -54,17 +54,17 @@ def run(self, tmp, task_vars):

@staticmethod
def get_disk_space(ansible_mounts):
if len(ansible_mounts):
root_size_available = None
for mnt in ansible_mounts:
if mnt.get("mount") == "/":
root_size_available = mnt.get("size_available")
if mnt.get("mount") == "/var":
return mnt.get("size_available")
if not ansible_mounts:
return None

return root_size_available
root_size_available = None
for mnt in ansible_mounts:
if mnt.get("mount") == "/":
root_size_available = mnt.get("size_available")
if mnt.get("mount") == "/var":
return mnt.get("size_available")

return None
return root_size_available

@staticmethod
def to_gibibytes(total_bytes):
Expand Down

0 comments on commit 43680e3

Please sign in to comment.