mirror of https://github.com/ansible/ansible.git
apt: ignore fail_on_autoremove and allow_downgrade when using aptitude (#81445)
* apt: ignore fail_on_autoremove and allow_downgrade when using aptitude * fail_on_autoremove (--no-remove) and allow_downgrade (--allow-downgrades) parameters are only valid for apt-get and not for aptitude. Ignore them when aptitude is detected and used. Fixes: #77868pull/81593/head
parent
5deb4ee991
commit
2e6d849bdb
@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- apt - ignore fail_on_autoremove and allow_downgrade parameters when using aptitude (https://github.com/ansible/ansible/issues/77868).
|
@ -0,0 +1,25 @@
|
||||
# See https://github.com/ansible/ansible/issues/77868
|
||||
# fail_on_autoremove is not valid parameter for aptitude
|
||||
- name: Use fail_on_autoremove using aptitude
|
||||
apt:
|
||||
upgrade: yes
|
||||
fail_on_autoremove: yes
|
||||
register: fail_on_autoremove_result
|
||||
|
||||
- name: Check if fail_on_autoremove does not fail with aptitude
|
||||
assert:
|
||||
that:
|
||||
- not fail_on_autoremove_result.failed
|
||||
|
||||
# See https://github.com/ansible/ansible/issues/77868
|
||||
# allow_downgrade is not valid parameter for aptitude
|
||||
- name: Use allow_downgrade using aptitude
|
||||
apt:
|
||||
upgrade: yes
|
||||
allow_downgrade: yes
|
||||
register: allow_downgrade_result
|
||||
|
||||
- name: Check if allow_downgrade does not fail with aptitude
|
||||
assert:
|
||||
that:
|
||||
- not allow_downgrade_result.failed
|
Loading…
Reference in New Issue