]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: refact `ceph_uid` fact
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 8 Jul 2020 13:49:47 +0000 (15:49 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 21 Sep 2020 16:26:19 +0000 (12:26 -0400)
There's no need to set this fact with a `set_fact`
We can achieve this in `ceph-defaults`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit bcc673f66c22364766beb4b5ebb971bd3f517693)

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-defaults/defaults/main.yml
roles/ceph-facts/tasks/facts.yml

index 7a5add2e44c4b05f6c93fa47998c532aa2fcf906..978c0bdeca1a01191ca521da5750995edfe9759b 100644 (file)
@@ -257,7 +257,7 @@ dummy:
 
 #ceph_conf_key_directory: /etc/ceph
 
-#ceph_uid: 167
+#ceph_uid: "{{ '64045' if not containerized_deployment | bool and ansible_os_family == 'Debian' else '167' }}"
 
 # Permissions for keyring files in /etc/ceph
 #ceph_keyring_permissions: '0600'
index 55e354cfb693028a5152850d639e292c17ead04d..341501ad26df0e421e417d58c72464d3080a27be 100644 (file)
@@ -257,7 +257,7 @@ ceph_iscsi_config_dev: false
 
 #ceph_conf_key_directory: /etc/ceph
 
-#ceph_uid: 167
+#ceph_uid: "{{ '64045' if not containerized_deployment | bool and ansible_os_family == 'Debian' else '167' }}"
 
 # Permissions for keyring files in /etc/ceph
 #ceph_keyring_permissions: '0600'
index 044b8682c4ed464dd255081f7b23a76ba91967a2..a224660531f3a8d2276a9321cf9c4272718e8e9c 100644 (file)
@@ -249,7 +249,7 @@ generate_fsid: true
 
 ceph_conf_key_directory: /etc/ceph
 
-ceph_uid: 167
+ceph_uid: "{{ '64045' if not containerized_deployment | bool and ansible_os_family == 'Debian' else '167' }}"
 
 # Permissions for keyring files in /etc/ceph
 ceph_keyring_permissions: '0600'
index c0f9e02fd70fde02889ea45c50bc2047a6685185..b76b6333e0156afc22217b929416011c648753fd 100644 (file)
     - item.value.holders|count == 0
     - item.key is not match osd_auto_discovery_exclude
 
-- name: set_fact ceph_uid for debian based system - non container
-  set_fact:
-    ceph_uid: 64045
-  when:
-    - not containerized_deployment | bool
-    - ansible_os_family == 'Debian'
-
 - name: backward compatibility tasks related
   when:
     - inventory_hostname in groups.get(rgw_group_name, [])