-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
Description
Your setup
Formula commit hash / release tag
based on dd8a5aa
Versions reports (master & minion)
[old, but not related]
Distribution: Debian/buster
Pillar / config used
[probably not relevant]
Bug details
Describe the bug
On installation (using repository), the service is not launched.
The formula contains:
service.running:
- name: {{ servicename }}
- enable: True
- onlyif: systemctl list-units | grep {{ servicename }} >/dev/null 2>&1
Steps to reproduce the bug
Install. Have the service not launched, and state.apply
Expected behaviour
Service should be launched, to ensure it is running.
Attempts to fix the bug
Removing the onlyif would start the service.
Additional context
The following command only shows something if the service is started. Stopping the service, and the command would not show anything anymore.
systemctl list-units | grep mongod