Jérémy Lecour
ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2777|524|2253|2462|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Fully Qualified Collection Name
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
|
|
- name: Read maximum map count
|
|
ansible.builtin.command:
|
|
cmd: "sysctl -n vm.max_map_count"
|
|
register: max_map_count
|
|
failed_when: False
|
|
changed_when: False
|
|
tags:
|
|
- config
|
|
|
|
- name: Maximum map count check
|
|
ansible.posix.sysctl:
|
|
name: vm.max_map_count
|
|
value: 262144
|
|
sysctl_file: /etc/sysctl.d/elasticsearch.conf
|
|
when: max_map_count | int < 262144
|
|
tags:
|
|
- config
|
|
|
|
- name: bootstrap.memory_lock
|
|
ansible.builtin.lineinfile:
|
|
dest: /etc/elasticsearch/elasticsearch.yml
|
|
line: "bootstrap.memory_lock: true"
|
|
regexp: "^bootstrap.memory_lock:"
|
|
insertafter: "^# *bootstrap.memory_lock:"
|
|
tags:
|
|
- config
|
|
|
|
- name: Create a system config directory for systemd overrides
|
|
ansible.builtin.file:
|
|
path: /etc/systemd/system/elasticsearch.service.d
|
|
state: directory
|
|
|
|
- name: Override memory config in systemd unit
|
|
community.general.ini_file:
|
|
dest: /etc/systemd/system/elasticsearch.service.d/elasticsearch.conf
|
|
section: Service
|
|
option: "LimitMEMLOCK"
|
|
value: "infinity"
|
|
notify:
|
|
- restart elasticsearch
|
|
tags:
|
|
- config
|