Hello,
I need to use Ansible URI and GET_URL to download a piece of software
called amanda backup server. I'm getting trouble with downloading. This is
my playbook:
- name: Create cookie for later request
uri:
url:
"https://cdn.zmanda.com/downloads/community/Amanda/3.5.1/Redhat_Enterprise_7.0/amanda-backup_server-3.5.1-1.rhel7.x86_64.rpm"
follow_redirects: all
register: stuff_list
- name: Debug
debug:
msg: "{{ stuff_list }}"
- name: Download amanda software
get_url:
url:
"https://cdn.zmanda.com/downloads/community/Amanda/3.5.1/Redhat_Enterprise_7.0/amanda-backup_server-3.5.1-1.rhel7.x86_64.rpm"
headers:
Cookie: "{{ stuff_list.cookies }}"
dest: /mytest
I'm getting below errors:
TASK [amanda : Create cookie for later request]
**************************************************************************************************************************
fatal: [myserver]: FAILED! => {"changed": false, "connection": "close",
"content": "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access
Denied</Message><RequestId>13AAEE01DDC4B1B6</RequestId><HostId>nc/VbplLWPwS8Z43nTSicEBc+0I7cZcdnSC7XZHUp9zV1bV6ivJhN56nqtTGNOPG95iV5yKnO1Q=</HostId></Error>",
"content_type": "application/xml", "date": "Thu, 02 Apr 2020 21:18:00 GMT",
"elapsed": 0, "msg": "Status code was 403 and not [200]: HTTP Error 403:
Forbidden", "redirected": false, "server": "AmazonS3", "status": 403,
"transfer_encoding": "chunked", "url":
"https://cdn.zmanda.com/downloads/community/Amanda/3.5.1/Redhat_Enterprise_7/amanda-backup_server-3.5.1-1.rhel7.x86_64.rpm",
"via": "1.1 b7d10369ae737ec35cf8d7faced56ef0.cloudfront.net (CloudFront)",
"x_amz_cf_id": "iOQFt0a3nEBiQp23AZEtTJVDF1WYWqCHSqxPQJjihj02ccKxvlhUNQ==",
"x_amz_cf_pop": "EWR53-C2", "x_cache": "Error from cloudfront"}
Has anyone used URI and GET_URL to successfully download any software from
CloudFront?
Thanks,
- Xinhuan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5de96697-c389-4a4b-8751-b356c3f1ec3d%40googlegroups.com.