Latest update to get_url forces absolute dest url

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

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 }}”

`