diff options
author | tchernomax <maxime.deroucy@gmail.com> | 2018-11-19 15:45:48 +0100 |
---|---|---|
committer | John R Barker <john@johnrbarker.com> | 2018-11-19 15:45:48 +0100 |
commit | 943edb33196ca4713e9e8037721c7757740bd8e2 (patch) | |
tree | a2b5a04a07c9d7528fe5b5eef021fe3a85049670 /test/integration/targets/apt | |
parent | Add common files for ONTAP and SOLIDFIRE unit tests (#48739) (diff) | |
download | ansible-943edb33196ca4713e9e8037721c7757740bd8e2.tar.xz ansible-943edb33196ca4713e9e8037721c7757740bd8e2.zip |
apt: add policy_rc_d option (#47191)
Diffstat (limited to 'test/integration/targets/apt')
-rw-r--r-- | test/integration/targets/apt/tasks/apt.yml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/integration/targets/apt/tasks/apt.yml b/test/integration/targets/apt/tasks/apt.yml index bd8f225a54..b0131682dd 100644 --- a/test/integration/targets/apt/tasks/apt.yml +++ b/test/integration/targets/apt/tasks/apt.yml @@ -258,3 +258,62 @@ assert: that: - apt_result is not changed + +# check policy_rc_d parameter + +- name: Install unscd but forbid service start + apt: + name: unscd + policy_rc_d: 101 + +- name: Stop unscd service + service: + name: unscd + state: stopped + register: service_unscd_stop + +- name: unscd service shouldn't have been stopped by previous task + assert: + that: service_unscd_stop is not changed + +- name: Uninstall unscd + apt: + name: unscd + policy_rc_d: 101 + +- name: Create incorrect /usr/sbin/policy-rc.d + copy: + dest: /usr/sbin/policy-rc.d + content: apt integration test + mode: 0755 + +- name: Install unscd but forbid service start + apt: + name: unscd + policy_rc_d: 101 + +- name: Stop unscd service + service: + name: unscd + state: stopped + register: service_unscd_stop + +- name: unscd service shouldn't have been stopped by previous task + assert: + that: service_unscd_stop is not changed + +- name: Create incorrect /usr/sbin/policy-rc.d + copy: + dest: /usr/sbin/policy-rc.d + content: apt integration test + mode: 0755 + register: policy_rc_d + +- name: Check if /usr/sbin/policy-rc.d was correctly backed-up during unscd install + assert: + that: policy_rc_d is not changed + +- name: Delete /usr/sbin/policy-rc.d + file: + path: /usr/sbin/policy-rc.d + state: absent |