modules.systemd: not finding just copied service files #16778
Closed
Description
I have this state.
UrsLT.service:
file.copy:
- name: /usr/lib/systemd/system/UrsLT.service
- source: /opt/UrsLT/UrsLT.service
service.running:
- enable: True
- require:
- file: UrsLT.service
It returns:
ID: UrsLT.service
Function: file.copy
Name: /usr/lib/systemd/system/UrsLT.service
Result: True
Comment: Copied "/opt/UrsLT/UrsLT.service" to "/usr/lib/systemd/system/UrsLT.service"
Changes:
----------
/usr/lib/systemd/system/UrsLT.service:
/opt/UrsLT/UrsLT.service
----------
ID: UrsLT.service
Function: service.running
Result: False
Comment: The named service UrsLT.service is not available
Changes:
It works fine with UrsLT
instead of UrsLT.service
.