diff options
author | 2016-09-21 07:17:52 +0000 | |
---|---|---|
committer | 2016-09-21 07:17:52 +0000 | |
commit | 58ac79cd54821bf8c3891d136be4254aa79bfa08 (patch) | |
tree | 52bd6f03a9e7d50b44ffce15dab47d5ddead381c /func/ansible_api.py | |
parent | ad90940e82c0039372d68f3136791851994557a9 (diff) | |
parent | 6183cefebbc1af8ad1987dc61372d6c2d6a59f6d (diff) |
Merge "add unified logger process for qtip"
Diffstat (limited to 'func/ansible_api.py')
-rw-r--r-- | func/ansible_api.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/func/ansible_api.py b/func/ansible_api.py index 57224eb7..2f02a62e 100644 --- a/func/ansible_api.py +++ b/func/ansible_api.py @@ -8,12 +8,15 @@ ############################################################################## import os from collections import namedtuple -import logging +from ansible.executor.playbook_executor import PlaybookExecutor +from ansible.inventory import Inventory from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager -from ansible.inventory import Inventory -from ansible.executor.playbook_executor import PlaybookExecutor + +from utils import logger_utils + +logger = logger_utils.QtipLogger('ansible_api').get class AnsibleApi: @@ -26,7 +29,7 @@ class AnsibleApi: def _check_path(self, file_path): if not os.path.exists(file_path): - logging.error('The playbook %s does not exist' % file_path) + logger.error('The playbook %s does not exist' % file_path) return False else: return True |