summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew <git@matthewgamble.net>2016-12-19 23:08:45 +1100
committerJohn R Barker <john@johnrbarker.com>2016-12-19 12:08:45 +0000
commitc58461596a995377e87bf65b97a5a51c9f902cbc (patch)
tree2fa74b4528db70c4a7a8c670ad3e74a3b4fdf6a7
parent87c0c33241cf4e08fc6668b01751a345ca34b04e (diff)
downloadansible-c58461596a995377e87bf65b97a5a51c9f902cbc.tar.gz
Support pacman packages using different types of compression (#19503)
It's possible to compress packages using several different compression methods, or not compressed at all. Previously, the pacman module only supported files compressed using xz. This update ensures that all compression types currently supported by pacman are supported by the ansible pacman module. The list of supported compression methods at the time of writing can be found here: https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n747
-rw-r--r--lib/ansible/modules/packaging/os/pacman.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/packaging/os/pacman.py b/lib/ansible/modules/packaging/os/pacman.py
index 9562cb21ec..2cf8924dca 100644
--- a/lib/ansible/modules/packaging/os/pacman.py
+++ b/lib/ansible/modules/packaging/os/pacman.py
@@ -348,7 +348,7 @@ def main():
pkg_files = []
for i, pkg in enumerate(pkgs):
- if pkg.endswith('.pkg.tar.xz'):
+ if re.match(".*\.pkg\.tar(\.(gz|bz2|xz|lrz|lzo|Z))?$", pkg):
# The package given is a filename, extract the raw pkg name from
# it and store the filename
pkg_files.append(pkg)