mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
utilities modules: PEP8 compliancy (#27741)
This commit is contained in:
parent
f30589c91d
commit
eee09565b1
4 changed files with 75 additions and 65 deletions
|
@ -51,11 +51,11 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
jid=dict(required=True),
|
||||
mode=dict(default='status', choices=['status','cleanup']),
|
||||
mode=dict(default='status', choices=['status', 'cleanup']),
|
||||
))
|
||||
|
||||
mode = module.params['mode']
|
||||
jid = module.params['jid']
|
||||
jid = module.params['jid']
|
||||
|
||||
# setup logging directory
|
||||
logdir = os.path.expanduser("~/.ansible_async")
|
||||
|
@ -82,9 +82,9 @@ def main():
|
|||
module.exit_json(results_file=log_path, ansible_job_id=jid, started=1, finished=0)
|
||||
else:
|
||||
module.fail_json(ansible_job_id=jid, results_file=log_path,
|
||||
msg="Could not parse job output: %s" % data, started=1, finished=1)
|
||||
msg="Could not parse job output: %s" % data, started=1, finished=1)
|
||||
|
||||
if not 'started' in data:
|
||||
if 'started' not in data:
|
||||
data['finished'] = 1
|
||||
data['ansible_job_id'] = jid
|
||||
elif 'finished' not in data:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue