Avoid hard-coded value in a generic ansible role
The service will be enabled if and only if its state is set to "running" or "started". This change addresses comment in this change: https://review.opendev.org/#/c/669365/1/tasks/config.yml@14 Change-Id: Ic25772c04047bcd3aaa3e8abc5b947feb66bcbbb
This commit is contained in:
parent
e289119ba1
commit
71b73d6406
|
@ -11,7 +11,7 @@
|
|||
|
||||
- name: Ensure chronyd is running
|
||||
service:
|
||||
enabled: yes
|
||||
enabled: "{{ (chrony_service_state|default('started') in ['running', 'started']) |bool }}"
|
||||
name: "{{ chrony_service_name }}"
|
||||
state: "{{ chrony_service_state|default('started') }}"
|
||||
when: chrony_manage_service|bool
|
||||
|
|
Loading…
Reference in New Issue