async: use async_dir for the async results file directory (#45461)

* win async: use async_dir for the async results file directory

* tried to unify POSIX and PowerShell async implementations of async_dir

* fix sanity issue
This commit is contained in:
Jordan Borean 2018-09-20 19:37:54 +10:00 committed by GitHub
parent 60979a96a9
commit 5c73d4f4bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 269 additions and 19 deletions

View file

@ -51,12 +51,13 @@ def main():
module = AnsibleModule(argument_spec=dict(
jid=dict(required=True),
mode=dict(default='status', choices=['status', 'cleanup']),
# passed in from the async_status action plugin
_async_dir=dict(required=True, type='path'),
))
mode = module.params['mode']
jid = module.params['jid']
async_dir = os.environ.get('ANSIBLE_ASYNC_DIR', '~/.ansible_async')
async_dir = module.params['_async_dir']
# setup logging directory
logdir = os.path.expanduser(async_dir)