mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add yum+apt integration tests for auto dependency installalation
The `apt` and `yum` modules will automatically install python dependencies. This change updates the existing integration tests to test whether auto-install of dependencies is functioning properly.
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
# UNINSTALL
|
||||
# UNINSTALL 'python-apt'
|
||||
# The `apt` module has the smarts to auto-install `python-apt`. To test, we
|
||||
# will first uninstall `python-apt`.
|
||||
- name: check python-apt with dpkg
|
||||
shell: dpkg -s python-apt
|
||||
register: dpkg_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall python-apt with apt
|
||||
apt: pkg=python-apt state=absent purge=yes
|
||||
register: apt_result
|
||||
when: dpkg_result|success
|
||||
|
||||
# UNINSTALL 'hello'
|
||||
# With 'python-apt' uninstalled, the first call to 'apt' should install
|
||||
# python-apt.
|
||||
- name: uninstall hello with apt
|
||||
apt: pkg=hello state=absent purge=yes
|
||||
register: apt_result
|
||||
@@ -8,9 +23,6 @@
|
||||
failed_when: False
|
||||
register: dpkg_result
|
||||
|
||||
- debug: var=apt_result
|
||||
- debug: var=dpkg_result
|
||||
|
||||
- name: verify uninstallation of hello
|
||||
assert:
|
||||
that:
|
||||
|
||||
Reference in New Issue
Block a user