From be3da221cd6723ffd939281ae67b5afae3f49628 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 29 Jul 2015 14:56:22 -0400 Subject: [PATCH 1/2] adjusted list hosts across adhoc and playbook cli --- lib/ansible/cli/adhoc.py | 1 + lib/ansible/cli/playbook.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/cli/adhoc.py b/lib/ansible/cli/adhoc.py index 9d1ab681dab..71c76374c3a 100644 --- a/lib/ansible/cli/adhoc.py +++ b/lib/ansible/cli/adhoc.py @@ -111,6 +111,7 @@ class AdHocCLI(CLI): self.display.warning("provided hosts list is empty, only localhost is available") if self.options.listhosts: + self.display.display(' hosts (%d):' % len(hosts)) for host in hosts: self.display.display(' %s' % host) return 0 diff --git a/lib/ansible/cli/playbook.py b/lib/ansible/cli/playbook.py index 44cc2515026..9a2a9a0ad72 100644 --- a/lib/ansible/cli/playbook.py +++ b/lib/ansible/cli/playbook.py @@ -166,7 +166,7 @@ class PlaybookCLI(CLI): if self.options.listhosts: playhosts = set(inventory.get_hosts(play.hosts)) - msg += "\n pattern: %s\n total hosts: %d\n hosts:" % (play.hosts, len(playhosts)) + msg += "\n pattern: %s\n hosts (%d):" % (play.hosts, len(playhosts)) for host in playhosts: msg += "\n %s" % host From 45ec25de830918d06bec2c7dbeaef10d1b738eb2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 29 Jul 2015 15:43:52 -0400 Subject: [PATCH 2/2] corrected var name --- docsite/rst/playbooks_variables.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 619a3cf07b6..c47dfe0fc73 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -525,13 +525,13 @@ To configure fact caching using jsonfile, enable it in ansible.cfg as follows:: [defaults] gathering = smart fact_caching = jsonfile - fact_caching_location = /path/to/cachedir + fact_caching_connection = /path/to/cachedir fact_caching_timeout = 86400 # seconds -`fact_caching_location` is a local filesystem path to a writeable +`fact_caching_connection` is a local filesystem path to a writeable directory (ansible will attempt to create the directory if one does not exist). - + .. _registered_variables: Registered Variables