From ea3914f4383a5460ea54b29bd4626f3f37f8f401 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Wed, 24 May 2017 14:45:35 -0400 Subject: [PATCH] Show the ansible version if invoked with more than one -v (#22091) * Show the ansible version if invoked with more than one -v * use display.vv directly --- lib/ansible/cli/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/ansible/cli/__init__.py b/lib/ansible/cli/__init__.py index 01b8967437..ed2599cc66 100644 --- a/lib/ansible/cli/__init__.py +++ b/lib/ansible/cli/__init__.py @@ -158,11 +158,12 @@ class CLI(with_metaclass(ABCMeta, object)): running an Ansible command. """ - if self.options.verbosity > 0: - if C.CONFIG_FILE: - display.display(u"Using %s as config file" % to_text(C.CONFIG_FILE)) - else: - display.display(u"No config file found; using defaults") + display.vv(self.parser.get_version()) + + if C.CONFIG_FILE: + display.v(u"Using %s as config file" % to_text(C.CONFIG_FILE)) + else: + display.v(u"No config file found; using defaults") @staticmethod def ask_vault_passwords():