mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
systemd template services must not discard template part
This commit is contained in:
parent
d3cbde57f5
commit
44ebd3f4f3
1 changed files with 4 additions and 2 deletions
|
@ -410,11 +410,13 @@ class LinuxService(Service):
|
|||
# adjust the service name to account for template service unit files
|
||||
index = name.find('@')
|
||||
if index != -1:
|
||||
name = name[:index+1]
|
||||
template_name = name[:index+1]
|
||||
else:
|
||||
template_name = name
|
||||
|
||||
self.__systemd_unit = None
|
||||
for line in out.splitlines():
|
||||
if line.startswith(name):
|
||||
if line.startswith(template_name):
|
||||
self.__systemd_unit = name
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue