# Latest update to get\_url forces absolute dest url

**URL:** <https://forum.ansible.com/t/latest-update-to-get-url-forces-absolute-dest-url/22812>\
**Category:** Ansible Project\
**Created:** [October 18, 2016, 1:33am UTC](https://forum.ansible.com/t/latest-update-to-get-url-forces-absolute-dest-url/22812 "2016-10-18T01:33:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Binney](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@David\_Binney](https://forum.ansible.com/u/David_Binney)\
**Post date:** [October 18, 2016, 1:33am UTC](https://forum.ansible.com/t/latest-update-to-get-url-forces-absolute-dest-url/22812/1 "2016-10-18T01:33:54Z")

</div>

Hey guys,

The latest changes to get\_url has forced the dest path to be absolute. Previously, this was relative, which was simple to maintain, but this change seems to add some complications. Basically, the previous version was just pulling into the relative “src” directory, but now I will have to somehow get the full path. I have tried a few things, but it does not seem to be working very well, considering the playbook is in under a different path.

playbook = /var/lib/go-agent/pipelines/feeds-uat/ansible/composer.yaml  
pwd = /var/lib/go-agent/pipelines/feeds-uat/ansible

where i want the file to end up

- /var/lib/go-agent/pipelines/feeds-uat/src  
Things I cannot do
- hardcode the path

Before the change, this was as simple as having dest=src, but now …

~ 22 - name: testing  
~ 23 command: “echo ${PWD%}” ## this is trying to get one level higher… does not work

- 24 register: src\_path

~ 29 # - name: Pull down composer file

- 30 # get\_url: url=[https://getcomposer.org/composer.phar](https://getcomposer.org/composer.phar) dest=‘{{src\_path.stdout}}/src’ mode=0755

---

<div class="post-metadata">

**Author:** ![David\_Binney](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@David\_Binney](https://forum.ansible.com/u/David_Binney)\
**Post date:** [January 4, 2017, 10:59pm UTC](https://forum.ansible.com/t/latest-update-to-get-url-forces-absolute-dest-url/22812/2 "2017-01-04T22:59:56Z")

</div>

Looks like i have make a work around myself. This will just grab the directory one level above the source script location.

`

- name: Get build path  
shell: echo $(dirname `pwd`)  
register: build\_path

- debug: msg=“Using build path {{ build\_path.stdout }}”

`
