This morning I just found my URL is missing .0 in /Redhat_Enterprise_7.0 <https://www.google.com/url?q=https%3A%2F%2Fcdn.zmanda.com%2Fdownloads%2Fcommunity%2FAmanda%2F3.5.1%2FRedhat_Enterprise_7.0%2Famanda-backup_server-3.5.1-1.rhel7.x86_64.rpm&sa=D&sntz=1&usg=AFQjCNEjZAEdUVdeYQJfNAkXZpvhNF_lew> part. Now it is working for me too. Thanks!
- Xinhuan On Thursday, April 2, 2020 at 5:56:16 PM UTC-4, Kai Stian Olstad wrote: > > On Thu, Apr 02, 2020 at 02:21:35PM -0700, Xinhuan Zheng wrote: > > 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 > > <https://www.google.com/url?q=https%3A%2F%2Fcdn.zmanda.com%2Fdownloads%2Fcommunity%2FAmanda%2F3.5.1%2FRedhat_Enterprise_7.0%2Famanda-backup_server-3.5.1-1.rhel7.x86_64.rpm&sa=D&sntz=1&usg=AFQjCNEjZAEdUVdeYQJfNAkXZpvhNF_lew>" > > > > headers: > > Cookie: "{{ stuff_list.cookies }}" > > dest: /mytest > > > > <snip /> > > > Has anyone used URI and GET_URL to successfully download any software > from > > CloudFront? > > get_url without the headers work for me. > > $ cat test.yml > --- > - hosts: localhost > tasks: > - 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" > > > dest: /tmp > > $ ansible-playbook test.yml > > PLAY [localhost] > ************************************************************************ > > TASK [get_url] > ************************************************************************** > changed: [localhost] > > PLAY RECAP > ****************************************************************************** > > > localhost : ok=1 changed=1 unreachable=0 > failed=0 skipped=0 > > $ file /tmp/amanda-backup_server-3.5.1-1.rhel7.x86_64.rpm > /tmp/amanda-backup_server-3.5.1-1.rhel7.x86_64.rpm: RPM v3.0 bin > i386/x86_64 > > > -- > Kai Stian Olstad > -- 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/6d883d5f-fa98-4fe6-903d-9fa336123746%40googlegroups.com.
