Skip to content

Commit

Permalink
Merge pull request #1 from jstenvall-ducksify/feature/systemd_service…
Browse files Browse the repository at this point in the history
…_stops_itself

Systemd stops its own service when started by timer
  • Loading branch information
jstenvall-ducksify authored Mar 22, 2022
2 parents 8f7cfe5 + 847a535 commit e003fab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/common/launch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
- name: Activate configured Systemd units
become: true
when: unit_config is defined and unit_config|length > 0 and (unit_item.type is not defined or unit_item.type != 'conf')
vars:
unit_item_manage_state: "{{ true if unit_item.manage_state is not defined or unit_item.manage_state else false }}"
systemd:
name: "{{ unit_item.name }}.{{ unit_item.type | default(_default_unit_type) }}"
state: "{{ unit_item.state | default(_default_unit_state) }}"
state: "{{ unit_item.state | default(_default_unit_state) if unit_item_manage_state else omit }}"
enabled: "{{ unit_item.enabled | default(_default_unit_enabled) }}"
loop: "{{ unit_config }}"
loop_control:
Expand Down

0 comments on commit e003fab

Please sign in to comment.