Al West:
Also please reply in thread, to be neat
Yashesh Lele:
[root@ansiblecontroller project-1]# ansible-playbook -i inventory.txt test.yaml
PLAY [Download and unzip httpd package] *************************************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************************************************************
ok: [target1]
ok: [target2]
TASK [Download httpd tar.gz file] *******************************************************************************************************************************************************************
fatal: [target2]: FAILED! => {“changed”: false, “dest”: “/opt/myapp/”, “elapsed”: 0, “gid”: 0, “group”: “root”, “mode”: “0755”, “msg”: “Request failed”, “owner”: “root”, “response”: “HTTP Error 404: Not Found”, “secontext”: “unconfined_u:object_r:usr_t:s0”, “size”: 6, “state”: “directory”, “status_code”: 404, “uid”: 0, “url”: “https://www.apache.org/dist/httpd/httpd-2.4.52.tar.gz”}
fatal: [target1]: FAILED! => {“changed”: false, “dest”: “/opt/myapp/”, “elapsed”: 0, “gid”: 0, “group”: “root”, “mode”: “0755”, “msg”: “Request failed”, “owner”: “root”, “response”: “HTTP Error 404: Not Found”, “secontext”: “unconfined_u:object_r:usr_t:s0”, “size”: 6, “state”: “directory”, “status_code”: 404, “uid”: 0, “url”: “https://www.apache.org/dist/httpd/httpd-2.4.52.tar.gz”}
PLAY RECAP ******************************************************************************************************************************************************************************************
target1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
target2 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Yashesh Lele:
this is the error
Yashesh Lele:
but if I install with curl its working
Yashesh Lele:
try this one
Al West:
no it does not work - it creates a text file, open it in your editor
Al West:
If you go here:
https://downloads.apache.org/httpd/
You can see the downloads.
Yashesh Lele:
you are simply great
Yashesh Lele:
I just changed url path
Yashesh Lele:
Thank you so much mate!!