global: make directories mode parameterizable

This commit makes it possible to parametrize the ceph directories modes.
So it changes hardocded mode for ceph related directories from 0755 to
customizable with `ceph_directories_mode` variable.

Closes: #2920

Signed-off-by: Artur Fijalkowski <artur.fijalkowski@ing.com>
Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 011270ca69)
pull/4396/head
Artur Fijalkowski 2018-08-01 14:37:40 +02:00 committed by mergify[bot]
parent 500c59c648
commit 27014df45e
7 changed files with 9 additions and 9 deletions

View File

@ -72,7 +72,7 @@
state: directory
owner: "ceph"
group: "ceph"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
- name: "generate ceph configuration file: {{ cluster }}.conf"
action: config_template
@ -98,7 +98,7 @@
file:
path: "{{ fetch_directory }}/{{ fsid }}/etc/ceph"
state: directory
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
delegate_to: localhost
when: ceph_conf_local | bool

View File

@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
with_items:
- /var/lib/ceph/bootstrap-mds/
- /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}

View File

@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
- name: fetch ceph mgr keyring
ceph_key:

View File

@ -56,7 +56,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "u=rwX,g=rX,o=rX"
mode: "{{ ceph_directories_mode | default('0755') }}"
recurse: true
- name: create custom admin keyring

View File

@ -31,7 +31,7 @@
state: directory
owner: "ceph"
group: "ceph"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
with_items:
- { name: "/var/lib/ceph/bootstrap-rgw", create: "{{ nfs_obj_gw }}" }
- { name: "/var/lib/ceph/radosgw", create: "{{ nfs_obj_gw }}" }

View File

@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
when: cephx | bool
with_items:
- /var/lib/ceph/bootstrap-osd/

View File

@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
with_items: "{{ rbd_client_admin_socket_path }}"
- name: create rados gateway instance directories
@ -14,7 +14,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "0755"
mode: "{{ ceph_directories_mode | default('0755') }}"
with_items: "{{ rgw_instances }}"
when: rgw_instances is defined