fix files mode syntax
From Ansible doc (https://docs.ansible.com/ansible/latest/modules/template_module.html#template-module) For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777) or quote it (like '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results.
This commit is contained in:
parent
1dbbda64aa
commit
bc7fc40b34
3 changed files with 15 additions and 15 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 2750
|
mode: "2750"
|
||||||
|
|
||||||
#Create pid directory
|
#Create pid directory
|
||||||
- name: Create PID Directory
|
- name: Create PID Directory
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0755
|
mode: "755"
|
||||||
|
|
||||||
#Create required directories
|
#Create required directories
|
||||||
- name: Create Others Directories
|
- name: Create Others Directories
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 2750
|
mode: "2750"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ es_log_dir }}"
|
- "{{ es_log_dir }}"
|
||||||
- "{{ es_data_dirs }}"
|
- "{{ es_data_dirs }}"
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
dest: "{{ es_conf_dir }}/elasticsearch.yml"
|
dest: "{{ es_conf_dir }}/elasticsearch.yml"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0660
|
mode: "660"
|
||||||
force: yes
|
force: yes
|
||||||
register: system_change
|
register: system_change
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
dest: "{{ default_file }}"
|
dest: "{{ default_file }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0660
|
mode: "660"
|
||||||
force: yes
|
force: yes
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ sysd_config_file | dirname }}"
|
path: "{{ sysd_config_file | dirname }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: "755"
|
||||||
|
|
||||||
- name: Copy specific ElasticSearch Systemd config file
|
- name: Copy specific ElasticSearch Systemd config file
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
section: Service
|
section: Service
|
||||||
option: LimitMEMLOCK
|
option: LimitMEMLOCK
|
||||||
value: infinity
|
value: infinity
|
||||||
mode: 0644
|
mode: "644"
|
||||||
notify:
|
notify:
|
||||||
- reload systemd configuration
|
- reload systemd configuration
|
||||||
- restart elasticsearch
|
- restart elasticsearch
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
dest: "{{ es_conf_dir }}/jvm.options"
|
dest: "{{ es_conf_dir }}/jvm.options"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0660
|
mode: "660"
|
||||||
force: yes
|
force: yes
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
|
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
dest: "{{ es_conf_dir }}/log4j2.properties"
|
dest: "{{ es_conf_dir }}/log4j2.properties"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0660
|
mode: "660"
|
||||||
force: yes
|
force: yes
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
when: es_config_log4j2 != ''
|
when: es_config_log4j2 != ''
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0750
|
mode: "750"
|
||||||
|
|
||||||
- name: Upload SSL/TLS keystore
|
- name: Upload SSL/TLS keystore
|
||||||
copy:
|
copy:
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_keystore | basename }}"
|
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_keystore | basename }}"
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0640
|
mode: "640"
|
||||||
when: es_ssl_keystore and es_ssl_truststore
|
when: es_ssl_keystore and es_ssl_truststore
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
register: copy_keystore
|
register: copy_keystore
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_truststore | basename }}"
|
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_truststore | basename }}"
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0640
|
mode: "640"
|
||||||
when: es_ssl_keystore and es_ssl_truststore
|
when: es_ssl_keystore and es_ssl_truststore
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
register: copy_truststore
|
register: copy_truststore
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
dest: "{{ es_ssl_certificate_path }}/{{ item | basename }}"
|
dest: "{{ es_ssl_certificate_path }}/{{ item | basename }}"
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0640
|
mode: "640"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ es_ssl_key }}"
|
- "{{ es_ssl_key }}"
|
||||||
- "{{ es_ssl_certificate }}"
|
- "{{ es_ssl_certificate }}"
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
|
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
|
||||||
owner: "{{ es_user }}"
|
owner: "{{ es_user }}"
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 0640
|
mode: "640"
|
||||||
#Restart if this changes
|
#Restart if this changes
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
when: es_ssl_certificate_authority | bool
|
when: es_ssl_certificate_authority | bool
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ es_group }}"
|
group: "{{ es_group }}"
|
||||||
mode: 2750
|
mode: "2750"
|
||||||
|
|
||||||
- name: Copy templates to elasticsearch
|
- name: Copy templates to elasticsearch
|
||||||
copy: src={{ item }} dest={{ es_conf_dir }}/templates owner=root group={{ es_group }} mode=0660
|
copy: src={{ item }} dest={{ es_conf_dir }}/templates owner=root group={{ es_group }} mode=0660
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue