Package: ansible Version: 2.3.1.0+dfsg-2 Severity: normal Hello!
Currently ansible doesn't allow for updating roles via forced installs. This affects all versions packaged by Debian. This is considered a bug that was fixed upstream: https://github.com/ansible/galaxy-issues/issues/249 https://github.com/ansible/ansible/pull/23391 Here's the patch: ``` commit 78836ec0b9719a62fa0f8619707a9f411ed4a4f0 Author: Michael Scherer <msche...@users.noreply.github.com> Date: Fri Apr 21 13:40:47 2017 +0200 Fix --force for unversionned requirements (#23391) In current stable (2.2), ansible galaxy install --force do erase a role, even if the version is not set. This commit should restore that specific behavior, in accordance to people reports: https://github.com/ansible/ansible/issues/11266#issuecomment-273801480 It was also the behavior planned in the initial discussion: "if you're not fixing versions in your roles file, then it's fine to expect that the role will be reinstalled each time you run ansible-galaxy install.", cf https://github.com/ansible/ansible/pull/12904 diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index 8554b68c4..6baf7affb 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -389,8 +389,9 @@ class GalaxyCLI(CLI): (role.name, role.install_info['version'], role.version or "unspecified")) continue else: - display.display('- %s is already installed, skipping.' % str(role)) - continue + if not force: + display.display('- %s is already installed, skipping.' % str(role)) + continue try: installed = role.install() ``` Please let me know if there's anything I can do to help this along. Cheers, JD -- System Information: Debian Release: 9.1 APT prefers stable APT policy: (600, 'stable'), (500, 'stable'), (300, 'testing'), (1, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages ansible depends on: ii python 2.7.13-2 ii python-crypto 2.6.1-7 ii python-httplib2 0.9.2+dfsg-1 ii python-jinja2 2.8-1 ii python-netaddr 0.7.18-2 ii python-paramiko 2.0.0-1 ii python-pkg-resources 33.1.1-1 ii python-yaml 3.12-1 Versions of packages ansible recommends: ii python-cryptography 1.7.1-3 ii python-jmespath 0.9.3-1 ii python-kerberos 1.1.5-2+b2 ii python-libcloud 1.5.0-1 ii python-selinux 2.6-3+b1 pn python-winrm <none> ii python-xmltodict 0.10.2-1 Versions of packages ansible suggests: pn cowsay <none> pn sshpass <none> -- no debconf information