mirror of https://github.com/ceph/ceph-ansible.git
facts: refact `ceph_uid` fact
There's no need to set this fact with a set_fact We can achieve this in ceph-defaults Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1875058 Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>guits-3.2
parent
17b1427084
commit
de98f9ab8e
|
@ -285,6 +285,8 @@ dummy:
|
|||
|
||||
#ceph_conf_key_directory: /etc/ceph
|
||||
|
||||
#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'
|
||||
|
||||
|
|
|
@ -285,6 +285,8 @@ ceph_rhcs_version: 3
|
|||
|
||||
#ceph_conf_key_directory: /etc/ceph
|
||||
|
||||
#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'
|
||||
|
||||
|
|
|
@ -90,21 +90,6 @@
|
|||
state: stopped
|
||||
enabled: no
|
||||
|
||||
- name: set_fact ceph_uid for ubuntu
|
||||
set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- name: set_fact ceph_uid for red hat
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("centos") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
- name: set_fact ceph_uid for rhel
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image is search("rhceph")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -173,14 +158,6 @@
|
|||
enabled: no
|
||||
failed_when: false
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -281,20 +258,6 @@
|
|||
shell: 'sgdisk --partition-guid=5:$(uuidgen) {{ item.stdout[:-2] if item.stdout is match("^/dev/(cciss|nvme|loop).*") else item.stdout[:-1] }}'
|
||||
with_items: '{{ lockbox_devices.results }}'
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- name: set_fact ceph_uid for red hat
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("centos") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
- name: set_fact ceph_uid for rhel
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image is search("rhceph")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -396,14 +359,6 @@
|
|||
state: stopped
|
||||
enabled: no
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -438,14 +393,6 @@
|
|||
state: stopped
|
||||
enabled: no
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -480,14 +427,6 @@
|
|||
state: stopped
|
||||
enabled: no
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
@ -526,14 +465,6 @@
|
|||
enabled: no
|
||||
failed_when: false
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 64045
|
||||
when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- set_fact:
|
||||
ceph_uid: 167
|
||||
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
# NOTE: changed from file module to raw find command for performance reasons
|
||||
# The file module has to run checks on current ownership of all directories and files. This is unnecessary
|
||||
# as in this case we know we want all owned by ceph user
|
||||
|
|
|
@ -277,6 +277,8 @@ generate_fsid: true
|
|||
|
||||
ceph_conf_key_directory: /etc/ceph
|
||||
|
||||
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'
|
||||
|
||||
|
|
|
@ -195,41 +195,6 @@
|
|||
- 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
|
||||
- ansible_os_family == 'Debian'
|
||||
|
||||
- name: set_fact ceph_uid for red hat or suse based system - non container
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when:
|
||||
- not containerized_deployment
|
||||
- ansible_os_family in ['RedHat', 'Suse']
|
||||
|
||||
- name: set_fact ceph_uid for debian based system - container
|
||||
set_fact:
|
||||
ceph_uid: 64045
|
||||
when:
|
||||
- containerized_deployment
|
||||
- ceph_docker_image_tag | string is search("ubuntu")
|
||||
|
||||
- name: set_fact ceph_uid for red hat based system - container
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when:
|
||||
- containerized_deployment
|
||||
- ceph_docker_image_tag | string is search("latest") or ceph_docker_image_tag | string is search("centos") or ceph_docker_image_tag | string is search("fedora")
|
||||
|
||||
- name: set_fact ceph_uid for red hat
|
||||
set_fact:
|
||||
ceph_uid: 167
|
||||
when:
|
||||
- containerized_deployment
|
||||
- ceph_docker_image is search("rhceph")
|
||||
|
||||
- name: set_fact rgw_hostname
|
||||
set_fact:
|
||||
rgw_hostname: "{% set _value = ansible_hostname -%}
|
||||
|
|
Loading…
Reference in New Issue