The role was previously using with_fileglob, which will only work when
targeting localhost, since that's where Ansible performs the lookup.
Instead, we can use the find module (requires Ansible 2+), then loop
over the registered results. The find approach also supports globbing,
so we can still fuzzily match on all likely deb packages by filtering
on the kernel version string.
Thanks @msheiny, I've tested this on several builds lately by pegging the commit for this PR and it's worked well. Merging, then will continue with repo splitting.
The role was previously using
with_fileglob
, which will only work when targeting localhost, since that's where Ansible performs the lookup. Instead, we can use thefind
module (requires Ansible 2+), then loop over the registered results. Thefind
approach also supports globbing, so we can still fuzzily match on all likely deb packages by filtering on the kernel version string.Closes #93.