diff --git a/group_vars/all.sample b/group_vars/all.sample index c903429452..e1324c5f70 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -303,6 +303,7 @@ dummy: ## MDS options # #mds_use_fqdn: false # if set to true, the MDS name used will be the fqdn in the ceph.conf +#mds_name: "{{ ansible_hostname }}" ## Rados Gateway options # @@ -380,3 +381,4 @@ dummy: # by ceph.conf.j2 template. so it should always be defined #mon_containerized_deployment_with_kv: false + diff --git a/group_vars/common-coreoss.sample b/group_vars/common-coreoss.sample index 32ae295533..071f0af9e7 100644 --- a/group_vars/common-coreoss.sample +++ b/group_vars/common-coreoss.sample @@ -14,4 +14,3 @@ dummy: #pypy_binary_directory: /opt/bin #pip_url: https://bootstrap.pypa.io/get-pip.py #local_temp_directory: /tmp - diff --git a/roles/ceph-common/tasks/facts.yml b/roles/ceph-common/tasks/facts.yml index d65fa2f363..b1cd054f58 100644 --- a/roles/ceph-common/tasks/facts.yml +++ b/roles/ceph-common/tasks/facts.yml @@ -61,3 +61,12 @@ - set_fact: is_kraken={{ ceph_version | version_compare('11.0.0', '>=') and ceph_version | version_compare('12.0.0', '<') }} + +- set_fact: + mds_name: "{{ ansible_hostname }}" + when: not mds_use_fqdn + +- set_fact: + mds_name: "{{ ansible_fqdn }}" + when: mds_use_fqdn + diff --git a/roles/ceph-mds/tasks/pre_requisite.yml b/roles/ceph-mds/tasks/pre_requisite.yml index cd16d76fa2..4b24ea5e02 100644 --- a/roles/ceph-mds/tasks/pre_requisite.yml +++ b/roles/ceph-mds/tasks/pre_requisite.yml @@ -1,12 +1,4 @@ --- -- set_fact: - mds_name: "{{ ansible_hostname }}" - when: not mds_use_fqdn - -- set_fact: - mds_name: "{{ ansible_fqdn }}" - when: mds_use_fqdn - - name: create bootstrap-mds directory file: path: /var/lib/ceph/bootstrap-mds/