diff --git a/changelogs/fragments/4275-pacman-sysupgrade.yml b/changelogs/fragments/4275-pacman-sysupgrade.yml new file mode 100644 index 0000000000..025cdc4ff1 --- /dev/null +++ b/changelogs/fragments/4275-pacman-sysupgrade.yml @@ -0,0 +1,3 @@ +bugfixes: + - pacman - fix ``upgrade=yes`` + (https://github.com/ansible-collections/community.general/pull/4275, https://github.com/ansible-collections/community.general/issues/4274). diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index af1590ee1a..4eec2499d1 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -410,7 +410,7 @@ class Pacman(object): cmd = [ self.pacman_path, "--sync", - "--sys-upgrade", + "--sysupgrade", "--quiet", "--noconfirm", ] diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/packaging/os/test_pacman.py index e1d3ae2d06..b0a92fb274 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman.py @@ -365,7 +365,7 @@ class TestPacman: # for real False, { - "args": ["pacman", "--sync", "--sys-upgrade", "--quiet", "--noconfirm"], + "args": ["pacman", "--sync", "--sysupgrade", "--quiet", "--noconfirm"], "return_value": [0, "stdout", "stderr"], }, None, @@ -377,7 +377,7 @@ class TestPacman: "args": [ "pacman", "--sync", - "--sys-upgrade", + "--sysupgrade", "--quiet", "--noconfirm", "--some",