mirror of https://github.com/ceph/ceph-ansible.git
ceph-facts: remove mds_name fact
The mds_name fact always gets the ansible_hostname value so we don't
need to have a dedicated fact for this and use the ansible_hostname fact
instead.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4e84b4beed
)
pull/5591/head
parent
c694454f82
commit
d5974086dd
|
@ -172,10 +172,6 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
fsid: "{{ cluster_uuid.stdout }}"
|
fsid: "{{ cluster_uuid.stdout }}"
|
||||||
|
|
||||||
- name: set_fact mds_name ansible_hostname
|
|
||||||
set_fact:
|
|
||||||
mds_name: "{{ ansible_hostname }}"
|
|
||||||
|
|
||||||
- name: resolve device link(s)
|
- name: resolve device link(s)
|
||||||
command: readlink -f {{ item }}
|
command: readlink -f {{ item }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
RETRIES="{{ handler_health_mds_check_retries }}"
|
RETRIES="{{ handler_health_mds_check_retries }}"
|
||||||
DELAY="{{ handler_health_mds_check_delay }}"
|
DELAY="{{ handler_health_mds_check_delay }}"
|
||||||
MDS_NAME="{{ mds_name }}"
|
MDS_NAME="{{ ansible_hostname }}"
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- /var/lib/ceph/bootstrap-mds/
|
- /var/lib/ceph/bootstrap-mds/
|
||||||
- /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}
|
- /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}
|
||||||
|
|
||||||
- name: get keys from monitors
|
- name: get keys from monitors
|
||||||
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
|
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
|
||||||
|
|
|
@ -21,15 +21,15 @@
|
||||||
- ansible_os_family in ['Suse', 'RedHat']
|
- ansible_os_family in ['Suse', 'RedHat']
|
||||||
|
|
||||||
- name: create mds keyring
|
- name: create mds keyring
|
||||||
command: ceph --cluster {{ cluster }} --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring auth get-or-create mds.{{ mds_name }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}/keyring
|
command: ceph --cluster {{ cluster }} --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}/keyring
|
creates: /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: cephx
|
when: cephx
|
||||||
|
|
||||||
- name: set mds key permissions
|
- name: set mds key permissions
|
||||||
file:
|
file:
|
||||||
path: /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}/keyring
|
path: /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
owner: "ceph"
|
owner: "ceph"
|
||||||
group: "ceph"
|
group: "ceph"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
- name: start and add that the metadata service to the init sequence
|
- name: start and add that the metadata service to the init sequence
|
||||||
service:
|
service:
|
||||||
name: ceph-mds@{{ mds_name }}
|
name: ceph-mds@{{ ansible_hostname }}
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
masked: no
|
masked: no
|
||||||
|
|
Loading…
Reference in New Issue