Using Get_Url Module

--- # Installing Appdyamic Agent
- hosts: localhost
user: root
sudo: yes
connection: ssh
gather_facts: yes

- name: Download foo.conf
get_url: url= dest=/home/john/ mode=0440 force_basic_auth=yes
I am trying to pull a war file from artifactory but below is error that i am getting
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/home/john/AdCanProcessor.war", "msg": "Request failed", "response": "HTTP Error 401: ", "state": "absent", "status_code": 401, "url": ""}
What i am trying to do is pull zip file from artifactory and trying to upload it on the server. To log into Artifactory it requires username/password. Can someone help?

  • post-author-pic
    Piotr N

    I think that you must use url_password and url_username attribute.

  • post-author-pic
    Stosh O

    Using the additional parameters Piotr noted should address your issue.

Looking For Team Training?

Learn More