Skip to content
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

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

jewnix
Copy link
Collaborator

@jewnix jewnix commented Nov 16, 2022

The current conditional did not work right.
The limit on RedHat <6 was because of the lack of systemd. Changing to using ansible_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 whole include_tasks.yml altogether instead of going through the whole task and skippin if it does not meet the requirements.

@@ -12,7 +12,10 @@

- name: Disable THP
include_tasks: configure_thp.yml
when: "'full' in group_names"
when:
- ansible_service_mgr == "systemd"

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?

Copy link
Collaborator

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"

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?

Copy link
Collaborator

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

@dtwersky dtwersky changed the title changed thp conditional to ansible_service_manager Fixes splunk/ansib… changed thp conditional to ansible_service_manager Fixes splunk#146 Nov 17, 2022
@dtwersky dtwersky changed the title changed thp conditional to ansible_service_manager Fixes splunk#146 changed thp conditional to ansible_service_manager Fixes splunk/ansible-role-for-splunk#146 Nov 17, 2022
@dtwersky dtwersky merged commit f92f179 into splunk:master Nov 21, 2022
@jewnix jewnix deleted the fix_configure_thp branch February 9, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants