Certificates permissions updated
This commit is contained in:
parent
35e66f83ba
commit
7dc0e20322
@ -35,14 +35,6 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
register: tlsconfig_template
|
register: tlsconfig_template
|
||||||
|
|
||||||
- name: Display config.yml contents
|
|
||||||
command: cat {{ local_certs_path }}/config.yml
|
|
||||||
register: command_output
|
|
||||||
|
|
||||||
- name: Print config.yml
|
|
||||||
debug:
|
|
||||||
msg: "{{command_output.stdout}}"
|
|
||||||
|
|
||||||
- name: Local action | Generate the node & admin certificates in local
|
- name: Local action | Generate the node & admin certificates in local
|
||||||
command: >-
|
command: >-
|
||||||
bash {{ local_certs_path }}/wazuh-certs-tool.sh -A
|
bash {{ local_certs_path }}/wazuh-certs-tool.sh -A
|
||||||
@ -52,7 +44,14 @@
|
|||||||
find:
|
find:
|
||||||
paths: "{{ local_certs_path }}/wazuh-certificates"
|
paths: "{{ local_certs_path }}/wazuh-certificates"
|
||||||
patterns: "*"
|
patterns: "*"
|
||||||
|
become: yes
|
||||||
register: certificate_files
|
register: certificate_files
|
||||||
|
|
||||||
|
- name: Change certificates directory ownership
|
||||||
|
file:
|
||||||
|
path: "{{ local_certs_path }}/wazuh-certificates"
|
||||||
|
state: directory
|
||||||
|
mode: '777'
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Change Certificates Ownership
|
- name: Change Certificates Ownership
|
||||||
@ -60,6 +59,7 @@
|
|||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
owner: "{{ ansible_effective_user_id }}"
|
owner: "{{ ansible_effective_user_id }}"
|
||||||
group: "{{ ansible_effective_user_id }}"
|
group: "{{ ansible_effective_user_id }}"
|
||||||
|
mode: '777'
|
||||||
become: yes
|
become: yes
|
||||||
with_items: "{{ certificate_files.files }}"
|
with_items: "{{ certificate_files.files }}"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user