Change default mode of mount files to 644

In case of setting file permissions to 640 systemd will raise an
alert [1]. In order to avoid spamming in logs, we change default mode to
644 as no passwords or credentials are going to be stored in this file.

With that we provide a way to override file mode if needed.

[1] https://paste.openstack.org/show/b83tSrjni8iB2WNsvDfQ/

Change-Id: I73164e9d4b02d7b3fae21b912369afcd1cc64abf
This commit is contained in:
Dmitriy Rabotyagov 2023-02-09 13:33:07 +01:00
parent 480bb0c871
commit f40c418af2
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ systemd_default_mount_options: 'defaults'
# Where: "/var/lib/glance/images"
# type: "nfs"
# options: "_netdev,auto"
# unit_mode: "0640"
# - what: "/openstack/swap.img"
# priority: "0"
# options: "%%"

View File

@ -56,7 +56,7 @@
dest: "/etc/systemd/system/{{ mount_service_name.stdout }}"
owner: "root"
group: "root"
mode: "0640"
mode: "{{ item.unit_mode | default('0644') }}"
config_overrides: "{{ item.config_overrides | default({}) }}"
config_type: "ini"
when: