Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Use systemd for service control #25

Closed
SuperQ opened this issue Dec 9, 2017 · 4 comments
Closed

Use systemd for service control #25

SuperQ opened this issue Dec 9, 2017 · 4 comments

Comments

@SuperQ
Copy link
Collaborator

SuperQ commented Dec 9, 2017

Since the role already assumes systemd service units, it would be better to declare them with the systemd rather than service. The service module does not understand or automatically run daemon-reload.

@paulfantom
Copy link
Member

We are doing it, look here: https://github.com/cloudalchemy/ansible-prometheus/blob/master/handlers/main.yml
However currently there is a bug in ansible systemd module, which causes failures in idempotency testing when enabling service, that's why we use service module here: https://github.com/cloudalchemy/ansible-prometheus/blob/master/tasks/main.yml#L8

@SuperQ
Copy link
Collaborator Author

SuperQ commented Dec 9, 2017

I haven't noticed any issues with:

- name: Enable and start prometheus service
  systemd:
    name: prometheus.service
    state: started
    enabled: yes
    daemon_reload: yes

Is there an upstream bug?

@paulfantom
Copy link
Member

We had some issues related to systemd module in our fluentd role, I need to consult it with @jkrol2 since he said there is something wrong.

slomo pushed a commit to slomo/ansible-prometheus that referenced this issue Dec 12, 2018
@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants