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:
Julien Mailleret 2019-11-28 07:02:33 +01:00
parent 1dbbda64aa
commit bc7fc40b34
No known key found for this signature in database
GPG key ID: F065093271C8DE71
3 changed files with 15 additions and 15 deletions

View file

@ -13,7 +13,7 @@
state: directory
owner: root
group: "{{ es_group }}"
mode: 0750
mode: "750"
- name: Upload SSL/TLS keystore
copy:
@ -21,7 +21,7 @@
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_keystore | basename }}"
owner: "{{ es_user }}"
group: "{{ es_group }}"
mode: 0640
mode: "640"
when: es_ssl_keystore and es_ssl_truststore
notify: restart elasticsearch
register: copy_keystore
@ -32,7 +32,7 @@
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_truststore | basename }}"
owner: "{{ es_user }}"
group: "{{ es_group }}"
mode: 0640
mode: "640"
when: es_ssl_keystore and es_ssl_truststore
notify: restart elasticsearch
register: copy_truststore
@ -43,7 +43,7 @@
dest: "{{ es_ssl_certificate_path }}/{{ item | basename }}"
owner: "{{ es_user }}"
group: "{{ es_group }}"
mode: 0640
mode: "640"
with_items:
- "{{ es_ssl_key }}"
- "{{ es_ssl_certificate }}"
@ -58,7 +58,7 @@
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
owner: "{{ es_user }}"
group: "{{ es_group }}"
mode: 0640
mode: "640"
#Restart if this changes
notify: restart elasticsearch
when: es_ssl_certificate_authority | bool