The recursive (-r) option of wget only downloads files that are 'visible'. This works fine for stuff like a web page with indexed directory listings etc. But anything that is not listed won't be magically retrieved. If a site does not contain any links to content that is actually there, wget will not know about it and hence won't download it.
If wget works, then http://remote.com/rpm must have links to all the files. So you best bet is to use the ansible command module with said wget options - provided you want to use ansible. Having said that, maybe you can elaborate on what the underlying task at hand is, and/or share the real/actual URLs etc. It might be possible to achieve the same thing in a different way. Dick On Fri, 27 Mar 2020 at 14:09, Tom K. <[email protected]> wrote: > Thanks Dick! > > I've started to get that impression after searching for quite some time. > > Currently using a shell command like this to get only specific files down: > > wget -r -nd --no-parent -A '*pattern*' http://site.com/path/to/file/ > > Hence why I was thinking it might be possible in Ansible. > > Cheers, > TK > > On Thursday, March 26, 2020 at 7:15:10 PM UTC-4, Dick Visser wrote: >> >> It's fundamentally impossible to do what you want, unless the remote >> server offers some sort of file system equivalent, like a directory >> index. >> >> Dick >> >> On Thu, 26 Mar 2020 at 19:24, Tom K. <[email protected]> wrote: >> > >> > Having some difficulty finding what is the Ansible code to do this: >> > >> > Downloading files with a specific regular expression from remote http / >> https host to a target server local path. >> > >> > >> > So would like to wget http://remote.com/rpm/app*.rpm to a set of >> target servers. get_url doesn't appear to support patterns as per Ansible >> Documentation. On the other hand, with_fileglob supports regular >> expressions and patterns but doesn't work with HTTP. >> > >> > >> > Looking for suggestions. >> > >> > >> > Cheers, >> > >> > TK >> > >> > -- >> > 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/42eee6fe-2134-4fd0-aa29-fc0571e9a249%40googlegroups.com. >> >> >> >> >> -- >> Dick Visser >> Trust & Identity Service Operations Manager >> GÉANT >> > -- > 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/f57ddea1-b412-472f-977c-b933f97ef43f%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/f57ddea1-b412-472f-977c-b933f97ef43f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Dick Visser Trust & Identity Service Operations Manager GÉANT -- 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/CAL8fbwN6OG%3DoO_qRFG73WA17yxT9cLngEa2PebY%3D1Bz3AN%2B%3DDw%40mail.gmail.com.
