-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only try stop sysprobe if it is installed #255
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for contributing here Daniel. One small change and then we should be 🚀
tasks/agent-linux.yml
Outdated
@@ -94,7 +94,7 @@ | |||
name: datadog-agent-sysprobe | |||
state: stopped | |||
enabled: no | |||
when: not datadog_skip_running_check and (not datadog_enabled or not datadog_sysprobe_enabled) | |||
when: not datadog_skip_running_check and (not datadog_enabled or not datadog_sysprobe_enabled) and ansible_facts.services['datadog-agent-sysprobe'] is defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to check both type of services as done here:
ansible-datadog/tasks/agent-linux.yml
Line 83 in 8db7a6a
and (ansible_facts.services['datadog-agent-sysprobe'] is defined or ansible_facts.services['datadog-agent-sysprobe.service'] is defined) }}" |
Perhaps we can create a fact about whether the service is installed or not (datadog_sysprobe_installed
?) and use that here and in the datadog_sysprobe_enabled
fact check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good shout, I'll sort that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally and it LGTM. Thanks for your contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi guys, would we be able to release this on Galaxy? Our provisioning is still failing because of this 👍 |
Hi @dv9io0o, I'll do a bugfix release today to include this. |
Fixes a bug introduced in #249 where if sysprobe wasn't installed, the provision would still try and stop the service and fail as it doesn't exist