Skip to content

Commit 6a20a47

Browse files
committed
roles: update default permissions for config files
Use 0600 by default since other users do not need access to config files. See: #78 Signed-off-by: Zakhar Bessarab <[email protected]>
1 parent 2ea1074 commit 6a20a47

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

roles/vmalert/tasks/configure.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
ansible.builtin.template:
5858
src: alerts.yml.j2
5959
dest: "{{ vic_vm_alert_rules_config_path }}"
60-
mode: 0751
60+
mode: 0600
6161
owner: "{{ vic_vm_alert_system_user }}"
6262
group: "{{ vic_vm_alert_system_group }}"
6363
validate: "/usr/local/bin/vmalert-prod {% for k, v in vic_vm_alert_service_args.items() %}{% if k.startswith('license') %} -{{ k }}={{ v }} {%endif %}{% endfor %} -dryRun -rule %s"

roles/vmauth/tasks/configure.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
dest: "{{ vmauth_config_dir }}/auth.yaml"
2929
owner: "{{ vmauth_system_user }}"
3030
group: "{{ vmauth_system_group }}"
31-
mode: 0644
31+
mode: 0600
3232
no_log: true
3333
when:
3434
- vmauth_auth_config != ""
@@ -40,5 +40,5 @@
4040
src: "vmauth.conf.j2"
4141
owner: "{{ vmauth_system_user }}"
4242
group: "{{ vmauth_system_group }}"
43-
mode: 0644
43+
mode: 0600
4444
notify: Restart vmauth service

roles/vminsert/tasks/configure.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
dest: "{{ vminsert_config_dir }}/relabel.yaml"
2929
owner: "{{ vminsert_system_user }}"
3030
group: "{{ vminsert_system_group }}"
31-
mode: 0644
31+
mode: 0600
3232
when:
3333
- vminsert_relabel_config != ""
3434
notify: Restart vminsert service

roles/vmsingle/tasks/configure.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
become: true
6060
ansible.builtin.copy:
6161
dest: ~/.aws/config
62-
mode: 0644
62+
mode: 0600
6363
content: |
6464
[default]
6565
region = eu-west-1
@@ -69,7 +69,7 @@
6969
ansible.builtin.template:
7070
src: creds.j2
7171
dest: ~/.aws/credentials
72-
mode: 0644
72+
mode: 0600
7373

7474
- name: Set proxy config
7575
ansible.builtin.set_fact:

0 commit comments

Comments
 (0)