From 47364bcadd017372dba88b78d8a89d263637afa0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 6 Mar 2024 11:24:40 +0100 Subject: [PATCH] Do not change mode of files recursively Current behavior leads to all files having executable bit which is not anticipated or required behaviour. Thus, we should avoid defining mode recursively to the directory Closes-Bug: #2052011 Change-Id: I30b9b6a70d2cabfb1f1f434cd883ea2503d867bc --- tasks/horizon_post_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/horizon_post_install.yml b/tasks/horizon_post_install.yml index 5739e704..70f6ec4e 100644 --- a/tasks/horizon_post_install.yml +++ b/tasks/horizon_post_install.yml @@ -29,15 +29,15 @@ include_tasks: horizon_post_install_source.yml when: horizon_install_method == 'source' -# NOTE(noonedeadpunk): change of permission is required for collectstatic and compilemessages +# NOTE(noonedeadpunk): change of ownership is required for collectstatic and compilemessages - name: Ensure horizon dirs are accessible by user file: path: "{{ item.path }}" state: directory owner: "{{ horizon_system_user_name }}" group: "{{ horizon_system_group_name }}" - mode: "0755" - recurse: yes + mode: "{{ item.mode | default(omit) }}" + recurse: "{{ item.recurse | default(True) }}" with_items: - { path: "{{ horizon_lib_dir }}", fixup: True } - { path: "/etc/openstack-dashboard", fixup: "{{ (ansible_facts['os_family'] | lower) == 'redhat' }}" }