mirror of https://github.com/ansible/ansible.git
apt: Mark dependencies as auto (#85170)
* Mark dependent packages as auto which are installed as part of deb file installation Fixes: #78123 Co-authored-by: Matt Clay <matt@mystile.com> Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>pull/85426/head
parent
205ca648bf
commit
e162eda1e6
@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- apt - mark dependencies installed as part of deb file installation as auto (https://github.com/ansible/ansible/issues/78123).
|
||||
@ -0,0 +1,33 @@
|
||||
- block:
|
||||
- name: Clean up before running tests
|
||||
apt:
|
||||
name:
|
||||
- packageone
|
||||
- packagetwo
|
||||
state: absent
|
||||
|
||||
- name: Install packageone from deb URL
|
||||
apt:
|
||||
deb: https://ci-files.testing.ansible.com/test/integration/targets/apt/packageone_1.0_all.deb
|
||||
register: packageone_installed
|
||||
|
||||
- name: Check if packagetwo is installed as part of packageone installation
|
||||
shell: dpkg -s packagetwo
|
||||
|
||||
- name: Check if packageone and packagetwo are marked as auto
|
||||
shell: apt-mark showauto packageone packagetwo
|
||||
register: auto_installed
|
||||
|
||||
- name: Make sure packageone is installed manually and packagetwo is marked as auto
|
||||
assert:
|
||||
that:
|
||||
- packageone_installed.changed
|
||||
- auto_installed.stdout_lines == ["packagetwo"]
|
||||
|
||||
always:
|
||||
- name: Clean up after tests
|
||||
apt:
|
||||
name:
|
||||
- packageone
|
||||
- packagetwo
|
||||
state: absent
|
||||
@ -0,0 +1,10 @@
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Standards-Version: 2.3.3
|
||||
|
||||
Package: packagetwo
|
||||
Version: 1.0
|
||||
Section: system
|
||||
Maintainer: John Doe <john@doe.com>
|
||||
Architecture: all
|
||||
Description: Dummy package upon which packageone depends
|
||||
Loading…
Reference in New Issue