Hi,
It seems like Ansible 2.1.2 and newer has changed path handling.
My observations are:
This affects, among others, the template module when using relative paths, as well as pwd from a shell command.
This seems like a pretty big change.
Am I doing something wrong? Which is correct?
To reproduce the observations:
Assuming the following directory tree, and a test.yml playbook:
.
├── ansible
│ ├── group_vars
│ ├── inventory
│ └── test.yml
└── other
test.yml:
- name: test
hosts: localhost
gather_facts: no
tasks:
- command: >
pwd
register: result
- debug: var=result.stdout
Executing:
cd /projects/acme-corp/my-project/
ansible-playbook -i local, ./ansible/test.yml
In Ansible 2.1.1, I get:
TASK [debug] *******************************************************************
ok: [localhost] => {
"result.stdout": "/projects/acme-corp/my-project"
}
In Ansible 2.1.2 and 1.9.0, I get:
TASK [debug] *******************************************************************
ok: [localhost] => {
"result.stdout": "/projects/acme-corp/my-project/ansible"
}
Thanks,
Steve