You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/systemd/tasks/test_indirect_service.yml

38 lines
831 B
YAML

- 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