Ensure that ganesha log directory exists

Some ganesha packages do not create ganesha log directories
while it's expected to be created while changing it's permissions.
Additionally it's no much sense in doing that as a separate task,
so directory is created as correct permissions are set with creation of
the rest required directories.

Signed-off-by: Dmitriy Rabotyagov <drabotyagov@vexxhost.com>
pull/4984/head
Dmitriy Rabotyagov 2020-01-20 13:44:23 +02:00 committed by Dimitri Savineau
parent eb9112d8fb
commit 0961ab8e60
1 changed files with 3 additions and 9 deletions

View File

@ -29,8 +29,8 @@
file: file:
path: "{{ item.name }}" path: "{{ item.name }}"
state: directory state: directory
owner: "ceph" owner: "{{ item.owner | default('ceph') }}"
group: "ceph" group: "{{ item.group | default('ceph') }}"
mode: "{{ ceph_directories_mode }}" mode: "{{ ceph_directories_mode }}"
with_items: with_items:
- { name: "/var/lib/ceph/bootstrap-rgw", create: "{{ nfs_obj_gw }}" } - { name: "/var/lib/ceph/bootstrap-rgw", create: "{{ nfs_obj_gw }}" }
@ -38,6 +38,7 @@
- { name: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}", create: "{{ nfs_obj_gw }}" } - { name: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}", create: "{{ nfs_obj_gw }}" }
- { name: "{{ rbd_client_admin_socket_path }}", create: "{{ nfs_obj_gw }}" } - { name: "{{ rbd_client_admin_socket_path }}", create: "{{ nfs_obj_gw }}" }
- { name: "/var/log/ceph", create: true } - { name: "/var/log/ceph", create: true }
- { name: "/var/log/ganesha", create: true, owner: root, group: root }
- { name: "/var/run/ceph", create: true } - { name: "/var/run/ceph", create: true }
when: item.create | bool when: item.create | bool
@ -85,10 +86,3 @@
owner: "ceph" owner: "ceph"
group: "ceph" group: "ceph"
mode: "0600" mode: "0600"
- name: change ownership on /var/log/ganesha
file:
path: /var/log/ganesha
owner: "root"
group: "root"
mode: "0755"