mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
replace test 'wget' package with 'hello' package
This commit is contained in:
parent
d7dd04c295
commit
89cee747d9
1 changed files with 21 additions and 21 deletions
|
@ -1,25 +1,25 @@
|
||||||
# UNINSTALL
|
# UNINSTALL
|
||||||
- name: uninstall wget with apt
|
- name: uninstall hello with apt
|
||||||
apt: pkg=wget state=absent purge=yes
|
apt: pkg=hello state=absent purge=yes
|
||||||
register: apt_result
|
register: apt_result
|
||||||
|
|
||||||
- name: check wget with dpkg
|
- name: check hello with dpkg
|
||||||
shell: dpkg --get-selections | fgrep wget
|
shell: dpkg --get-selections | fgrep hello
|
||||||
failed_when: False
|
failed_when: False
|
||||||
register: dpkg_result
|
register: dpkg_result
|
||||||
|
|
||||||
- debug: var=apt_result
|
- debug: var=apt_result
|
||||||
- debug: var=dpkg_result
|
- debug: var=dpkg_result
|
||||||
|
|
||||||
- name: verify uninstallation of wget
|
- name: verify uninstallation of hello
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'changed' in apt_result"
|
- "'changed' in apt_result"
|
||||||
- "dpkg_result.rc == 1"
|
- "dpkg_result.rc == 1"
|
||||||
|
|
||||||
# UNINSTALL AGAIN
|
# UNINSTALL AGAIN
|
||||||
- name: uninstall wget with apt
|
- name: uninstall hello with apt
|
||||||
apt: pkg=wget state=absent purge=yes
|
apt: pkg=hello state=absent purge=yes
|
||||||
register: apt_result
|
register: apt_result
|
||||||
|
|
||||||
- name: verify no change on re-uninstall
|
- name: verify no change on re-uninstall
|
||||||
|
@ -28,19 +28,19 @@
|
||||||
- "not apt_result.changed"
|
- "not apt_result.changed"
|
||||||
|
|
||||||
# INSTALL
|
# INSTALL
|
||||||
- name: install wget with apt
|
- name: install hello with apt
|
||||||
apt: name=wget state=present
|
apt: name=hello state=present
|
||||||
register: apt_result
|
register: apt_result
|
||||||
|
|
||||||
- name: check wget with dpkg
|
- name: check hello with dpkg
|
||||||
shell: dpkg --get-selections | fgrep wget
|
shell: dpkg --get-selections | fgrep hello
|
||||||
failed_when: False
|
failed_when: False
|
||||||
register: dpkg_result
|
register: dpkg_result
|
||||||
|
|
||||||
- debug: var=apt_result
|
- debug: var=apt_result
|
||||||
- debug: var=dpkg_result
|
- debug: var=dpkg_result
|
||||||
|
|
||||||
- name: verify installation of wget
|
- name: verify installation of hello
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "apt_result.changed"
|
- "apt_result.changed"
|
||||||
|
@ -57,8 +57,8 @@
|
||||||
- "'stdout_lines' in apt_result"
|
- "'stdout_lines' in apt_result"
|
||||||
|
|
||||||
# INSTALL AGAIN
|
# INSTALL AGAIN
|
||||||
- name: install wget with apt
|
- name: install hello with apt
|
||||||
apt: name=wget state=present
|
apt: name=hello state=present
|
||||||
register: apt_result
|
register: apt_result
|
||||||
|
|
||||||
- name: verify no change on re-install
|
- name: verify no change on re-install
|
||||||
|
|
Loading…
Reference in a new issue