diff --git a/ansible/inventory.py b/ansible/inventory.py index 3ec4881..8549309 100755 --- a/ansible/inventory.py +++ b/ansible/inventory.py @@ -41,6 +41,7 @@ class RisottoInventory(object): parser.add_argument('--nocache', action='store_true') parser.add_argument('--debug', action='store_true') parser.add_argument('--pretty_print', action='store_true') + parser.add_argument('--quite', action='store_true') self.args = parser.parse_args() if self.args.debug: global DEBUG @@ -75,7 +76,7 @@ class RisottoInventory(object): 'hosts': servers, 'vars': { # FIXME -# 'ansible_ssh_host': '192.168.0.29', + 'ansible_ssh_host': '192.168.0.29', 'ansible_ssh_user': 'root', 'ansible_python_interpreter': '/usr/bin/python3' } @@ -119,7 +120,7 @@ def main(): from pprint import pprint from json import loads pprint(loads(values)) - else: + elif not inv.args.quite: print(values) except Exception as err: if DEBUG: