-
Notifications
You must be signed in to change notification settings - Fork 104
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
changed thp conditional to ansible_service_manager Fixes splunk/ansible-role-for-splunk#146 #147
Conversation
@@ -12,7 +12,10 @@ | |||
|
|||
- name: Disable THP | |||
include_tasks: configure_thp.yml | |||
when: "'full' in group_names" | |||
when: | |||
- ansible_service_mgr == "systemd" |
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.
Where is ansible_service_mgr
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.
It's a built-in fact
when: | ||
- ansible_service_mgr == "systemd" | ||
- ansible_connection != "docker" | ||
- "'full' in group_names" |
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.
Are the double quotes around this necessary?
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.
Yes, it needs the double quotes
The current conditional did not work right.
The limit on RedHat <6 was because of the lack of
systemd
. Changing to usingansible_service_manager
will do the same thing, and is more descriptive of the reason why it's done that way.I moved it to the
configure_os.yml
so it can skip the wholeinclude_tasks.yml
altogether instead of going through the whole task and skippin if it does not meet the requirements.