mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test. * Enable pylint suppressed-message test. * Enable pylint redundant-unittest-assert test. * Enable pylint bad-open-mode test. * Enable pylint signature-differs test. * Enable pylint unnecessary-pass test. * Enable pylint unnecessary-lambda test. * Enable pylint raising-bad-type test. * Enable pylint logging-not-lazy test. * Enable pylint logging-format-interpolation test. * Enable pylint useless-else-on-loop test.
This commit is contained in:
parent
01563ccd5d
commit
7714dcd04e
36 changed files with 92 additions and 135 deletions
|
@ -78,22 +78,22 @@ class CallbackModule(CallbackBase):
|
|||
self.hostname = socket.gethostname()
|
||||
|
||||
def runner_on_failed(self, host, res, ignore_errors=False):
|
||||
self.logger.error('%s ansible-command: task execution FAILED; host: %s; message: %s' % (self.hostname, host, self._dump_results(res)))
|
||||
self.logger.error('%s ansible-command: task execution FAILED; host: %s; message: %s', self.hostname, host, self._dump_results(res))
|
||||
|
||||
def runner_on_ok(self, host, res):
|
||||
self.logger.info('%s ansible-command: task execution OK; host: %s; message: %s' % (self.hostname, host, self._dump_results(res)))
|
||||
self.logger.info('%s ansible-command: task execution OK; host: %s; message: %s', self.hostname, host, self._dump_results(res))
|
||||
|
||||
def runner_on_skipped(self, host, item=None):
|
||||
self.logger.info('%s ansible-command: task execution SKIPPED; host: %s; message: %s' % (self.hostname, host, 'skipped'))
|
||||
self.logger.info('%s ansible-command: task execution SKIPPED; host: %s; message: %s', self.hostname, host, 'skipped')
|
||||
|
||||
def runner_on_unreachable(self, host, res):
|
||||
self.logger.error('%s ansible-command: task execution UNREACHABLE; host: %s; message: %s' % (self.hostname, host, self._dump_results(res)))
|
||||
self.logger.error('%s ansible-command: task execution UNREACHABLE; host: %s; message: %s', self.hostname, host, self._dump_results(res))
|
||||
|
||||
def runner_on_async_failed(self, host, res, jid):
|
||||
self.logger.error('%s ansible-command: task execution FAILED; host: %s; message: %s' % (self.hostname, host, self._dump_results(res)))
|
||||
self.logger.error('%s ansible-command: task execution FAILED; host: %s; message: %s', self.hostname, host, self._dump_results(res))
|
||||
|
||||
def playbook_on_import_for_host(self, host, imported_file):
|
||||
self.logger.info('%s ansible-command: playbook IMPORTED; host: %s; message: imported file %s' % (self.hostname, host, imported_file))
|
||||
self.logger.info('%s ansible-command: playbook IMPORTED; host: %s; message: imported file %s', self.hostname, host, imported_file)
|
||||
|
||||
def playbook_on_not_import_for_host(self, host, missing_file):
|
||||
self.logger.info('%s ansible-command: playbook NOT IMPORTED; host: %s; message: missing file %s' % (self.hostname, host, missing_file))
|
||||
self.logger.info('%s ansible-command: playbook NOT IMPORTED; host: %s; message: missing file %s', self.hostname, host, missing_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue