I want to download a .j2 file from a local bitbucket repository to a local folder.
I want to download a .j2 file from a local bitbucket repository to a local folder.
- name: download artifacts - fetch template from repo
delegate_to: localhost
ansible.builtin.get_url:
url: “https://devtools/bitbucket/projects/EAKTEMV/repos/infrastruktur/raw/postgres/templates/{{ item }}”
dest: “…/temp/{{ item }}”
loop:- create_user_db_schema.sql.j2
==============================================================
- the TASK runs fine
- there is the raw file under the url
- a file named ‘create_user_db_schema.sql.j2’ is being downloaded
contenst of the file is the html of the website rather then the raw .j2 file though.
What am I doing wrong?
You seem to be fetching the wrong url