Skip to content

Commit

Permalink
common: add a default value for ceph_directories_mode
Browse files Browse the repository at this point in the history
Since this variable makes it possible to customize the mode for ceph
directories, let's make it a bit more explicit by adding a default value
in ceph-defaults.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 483adb5)
  • Loading branch information
guits authored and dsavineau committed Nov 20, 2020
1 parent 0efc347 commit fe69989
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion group_vars/all.yml.sample
Expand Up @@ -106,7 +106,7 @@ dummy:
#upgrade_ceph_packages: False

#ceph_use_distro_backports: false # DEBIAN ONLY

#ceph_directories_mode: "0755"

###########
# INSTALL #
Expand Down
2 changes: 1 addition & 1 deletion group_vars/rhcs.yml.sample
Expand Up @@ -106,7 +106,7 @@ fetch_directory: ~/ceph-ansible-keys
#upgrade_ceph_packages: False

#ceph_use_distro_backports: false # DEBIAN ONLY

#ceph_directories_mode: "0755"

###########
# INSTALL #
Expand Down
4 changes: 2 additions & 2 deletions roles/ceph-config/tasks/main.yml
Expand Up @@ -97,7 +97,7 @@
state: directory
owner: "ceph"
group: "ceph"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"

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

Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-defaults/defaults/main.yml
Expand Up @@ -98,7 +98,7 @@ ntp_daemon_type: chronyd
upgrade_ceph_packages: False

ceph_use_distro_backports: false # DEBIAN ONLY

ceph_directories_mode: "0755"

###########
# INSTALL #
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-mds/tasks/common.yml
Expand Up @@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"
with_items:
- /var/lib/ceph/bootstrap-mds/
- /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-mgr/tasks/common.yml
Expand Up @@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"

- name: fetch ceph mgr keyring
ceph_key:
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-mon/tasks/deploy_monitors.yml
Expand Up @@ -57,7 +57,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"

# We don't do the recursion in the task above to avoid setting `mode` (which
# defaults to 0755) on files.
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-nfs/tasks/pre_requisite_non_container.yml
Expand Up @@ -31,7 +31,7 @@
state: directory
owner: "ceph"
group: "ceph"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"
with_items:
- { name: "/var/lib/ceph/bootstrap-rgw", create: "{{ nfs_obj_gw }}" }
- { name: "/var/lib/ceph/radosgw", create: "{{ nfs_obj_gw }}" }
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-osd/tasks/common.yml
Expand Up @@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"
when: cephx | bool
with_items:
- /var/lib/ceph/bootstrap-osd/
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-rgw/tasks/common.yml
Expand Up @@ -5,7 +5,7 @@
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_directories_mode | default('0755') }}"
mode: "{{ ceph_directories_mode }}"
with_items: "{{ rbd_client_admin_socket_path }}"

- name: get keys from monitors
Expand Down

0 comments on commit fe69989

Please sign in to comment.