issue #297: local actions must execute with fixed directory.
Local actions must execute in the the parent directory of the playbook that defines the action.pull/298/head
parent
26ba3e4d83
commit
012745efea
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
- import_playbook: cwd_preserved.yml
|
||||||
|
#- import_playbook: env_preserved.yml
|
||||||
|
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
# 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
|
||||||
|
any_errors_fatal: true
|
||||||
|
hosts: test-targets
|
||||||
|
tasks:
|
||||||
|
- connection: local
|
||||||
|
command: pwd
|
||||||
|
register: pwd
|
||||||
|
|
||||||
|
- connection: local
|
||||||
|
stat:
|
||||||
|
path: "{{pwd.stdout}}/cwd_preserved.yml"
|
||||||
|
register: stat
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: stat.stat.exists
|
||||||
|
|
||||||
Loading…
Reference in New Issue