always use 0770 for the certs folder

This commit is contained in:
Pablo Escobar 2020-05-23 13:20:19 +02:00
parent 57c2a9bb76
commit d9f7e79b7d
3 changed files with 8 additions and 4 deletions

View File

@ -184,7 +184,7 @@
path: "{{ node_certs_destination }}/" path: "{{ node_certs_destination }}/"
owner: root owner: root
group: elasticsearch group: elasticsearch
mode: 0774 mode: 0770
state: directory state: directory
recurse: no recurse: no
when: when:

View File

@ -56,13 +56,14 @@
- not generate_CA - not generate_CA
tags: xpack-security tags: xpack-security
- name: Ensuring certificates folder owner - name: Ensuring certificates folder owner and permissions
file: file:
path: "{{ node_certs_destination }}/" path: "{{ node_certs_destination }}/"
state: directory state: directory
recurse: no recurse: no
owner: kibana owner: kibana
group: kibana group: kibana
mode: 0770
when: when:
- kibana_xpack_security - kibana_xpack_security
tags: xpack-security tags: xpack-security
@ -70,7 +71,6 @@
- name: Ensuring certificates folder owner - name: Ensuring certificates folder owner
file: file:
path: "{{ node_certs_destination }}/" path: "{{ node_certs_destination }}/"
mode: 0770
recurse: no recurse: no
when: when:
- kibana_xpack_security - kibana_xpack_security

View File

@ -30,6 +30,8 @@
copy: copy:
src: "{{ item }}" src: "{{ item }}"
dest: "{{ node_certs_destination }}/" dest: "{{ node_certs_destination }}/"
owner: root
group: root
mode: 0440 mode: 0440
with_items: with_items:
- "{{ master_certs_path }}/{{ filebeat_node_name }}/{{ filebeat_node_name }}.key" - "{{ master_certs_path }}/{{ filebeat_node_name }}/{{ filebeat_node_name }}.key"
@ -44,6 +46,8 @@
copy: copy:
src: "{{ item }}" src: "{{ item }}"
dest: "{{ node_certs_destination }}/" dest: "{{ node_certs_destination }}/"
owner: root
group: root
mode: 0440 mode: 0440
with_items: with_items:
- "{{ master_certs_path }}/{{ filebeat_node_name }}/{{ filebeat_node_name }}.key" - "{{ master_certs_path }}/{{ filebeat_node_name }}/{{ filebeat_node_name }}.key"
@ -57,7 +61,7 @@
- name: Ensuring folder & certs permissions - name: Ensuring folder & certs permissions
file: file:
path: "{{ node_certs_destination }}/" path: "{{ node_certs_destination }}/"
mode: 0774 mode: 0770
state: directory state: directory
recurse: no recurse: no
when: when: