-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from UnderGreen/ansible_lint
Ansible lint
- Loading branch information
Showing
21 changed files
with
228 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description="Disable Transparent Hugepage before MongoDB boots" | ||
#WARN: check service name on your system | ||
# If you are using MongoDB Cloud, service name is "mongodb-mms-automation-agent.service" | ||
Before=mongodb.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' | ||
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' | ||
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled' | ||
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag' | ||
ExecStart=-/bin/bash -c 'echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag' | ||
ExecStart=-/bin/bash -c 'echo 0 > /sys/kernel/mm/redhat_transparent_hugepage/khugepaged/defrag' | ||
ExecStart=-/bin/bash -c 'echo no > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag' | ||
ExecStart=-/bin/bash -c 'echo no > /sys/kernel/mm/redhat_transparent_hugepage/khugepaged/defrag' | ||
|
||
[Install] | ||
#WARN: check service name on your system | ||
# If you are using MongoDB Cloud, service name is "mongodb-mms-automation-agent.service" | ||
RequiredBy=mongodb.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
--- | ||
|
||
- name: reload systemd | ||
systemd: | ||
daemon_reload: yes | ||
when: ansible_service_mgr == "systemd" and mongodb_manage_service | ||
|
||
- name: mongodb reload | ||
service: name={{ mongodb_daemon_name }} state=reloaded | ||
when: mongodb_manage_service | ||
when: mongodb_manage_service|bool | ||
|
||
- name: mongodb restart | ||
service: name={{ mongodb_daemon_name }} state=restarted | ||
when: mongodb_manage_service | ||
when: mongodb_manage_service|bool | ||
|
||
- name: mongodb-mms-monitoring-agent restart | ||
service: name=mongodb-mms-monitoring-agent state=restarted | ||
when: mongodb_manage_service | ||
|
||
- name: reload systemd | ||
shell: systemctl daemon-reload | ||
when: mongodb_is_systemd and mongodb_manage_service | ||
when: mongodb_manage_service|bool | ||
|
||
- name: restart sysfsutils | ||
service: name=sysfsutils state=restarted | ||
|
||
- name: service started | ||
service: | ||
name: "{{ mongodb_daemon_name }}" | ||
state: started | ||
|
||
- name: wait when mongodb is started | ||
wait_for: | ||
host: "{{ item }}" | ||
port: "{{ mongodb_net_port }}" | ||
timeout: 120 | ||
with_items: "{{ mongodb_net_bindip.split(',') | map('replace', '0.0.0.0', '127.0.0.1') | list }}" | ||
|
||
- name: wait when mongodb is started on localhost | ||
wait_for: | ||
host: "127.0.0.1" | ||
port: "{{ mongodb_net_port }}" | ||
delay: 5 | ||
timeout: 120 |
Oops, something went wrong.