diff options
Diffstat (limited to 'test/integration/targets/systemd/tasks/test_indirect_service.yml')
-rw-r--r-- | test/integration/targets/systemd/tasks/test_indirect_service.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/integration/targets/systemd/tasks/test_indirect_service.yml b/test/integration/targets/systemd/tasks/test_indirect_service.yml new file mode 100644 index 0000000..fc11343 --- /dev/null +++ b/test/integration/targets/systemd/tasks/test_indirect_service.yml @@ -0,0 +1,37 @@ +- name: Copy service file + template: + src: "{{item}}" + dest: "/etc/systemd/system/{{item}}" + owner: root + group: root + loop: + - dummy.service + - dummy.socket + notify: remove dummy indirect service + +- name: Ensure dummy indirect service is disabled + systemd: + name: "{{indirect_service}}" + enabled: false + register: dummy_disabled + +- assert: + that: + - dummy_disabled is not changed + +- name: Enable indirect service 1 + systemd: + name: '{{ indirect_service }}' + enabled: true + register: systemd_enable_dummy_indirect_1 + +- name: Enable indirect service 2 + systemd: + name: '{{ indirect_service }}' + enabled: true + register: systemd_enable_dummy_indirect_2 + +- assert: + that: + - systemd_enable_dummy_indirect_1 is changed + - systemd_enable_dummy_indirect_2 is not changed
\ No newline at end of file |