2018-07-10 16:56:05 +00:00
|
|
|
|
|
|
|
# Current working directory should be that of WorkerProcess -- which is the
|
|
|
|
# same directory as the currently executing playbook, i.e. integration/local/
|
|
|
|
#
|
|
|
|
# https://github.com/ansible/ansible/issues/14489
|
|
|
|
|
|
|
|
- name: integration/local/cwd_preserved.yml
|
|
|
|
hosts: test-targets
|
|
|
|
tasks:
|
2022-09-12 17:46:21 +00:00
|
|
|
- name: Get local cwd
|
|
|
|
connection: local
|
2018-07-10 16:56:05 +00:00
|
|
|
command: pwd
|
|
|
|
register: pwd
|
|
|
|
|
|
|
|
- connection: local
|
|
|
|
stat:
|
|
|
|
path: "{{pwd.stdout}}/cwd_preserved.yml"
|
|
|
|
register: stat
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: stat.stat.exists
|
2021-09-07 21:10:25 +00:00
|
|
|
fail_msg: stat={{stat}}
|
2021-11-02 20:07:28 +00:00
|
|
|
tags:
|
|
|
|
- cwd_prseserved
|