diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/systemd/tasks/test_indirect_service.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 |