Use ini_file module for systemd overriding config file, better task naming and fix variable indentation

This commit is contained in:
Ludovic Petetin 2019-07-22 15:19:00 +02:00
parent 5994840c75
commit 5bac5a4dbf

View file

@ -26,13 +26,13 @@
#Copy the systemd specific file if systemd is installed #Copy the systemd specific file if systemd is installed
- when: use_system_d and m_lock_enabled - when: use_system_d and m_lock_enabled
become: yes
block: block:
- name: Make sure destination dir exists - name: Make sure destination dir exists
file: path={{ sysd_config_file | dirname }} state=directory recurse=yes mode=0755 file: path={{ sysd_config_file | dirname }} state=directory mode=0755
- name: Copy Systemd File for Instance - name: Copy specific ElasticSearch Systemd config file
become: yes ini_file: path={{ sysd_config_file }} section=Service option=LimitMEMLOCK value=infinity mode=0644
copy: src=systemd/elasticsearch_override.conf dest={{ sysd_config_file }} mode=0644 force=yes
notify: notify:
- reload systemd configuration - reload systemd configuration
- restart elasticsearch - restart elasticsearch