- item.item.copy_key | bool
no_log: "{{ no_log_on_ceph_key_tasks }}"
+- name: create mds keyring
+ ceph_key:
+ name: "mds.{{ ansible_facts['hostname'] }}"
+ cluster: "{{ cluster }}"
+ user: client.bootstrap-mds
+ user_key: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
+ caps:
+ mon: "allow profile mds"
+ mds: "allow"
+ osd: "allow rwx"
+ dest: "/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}/keyring"
+ import_key: false
+ owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
+ group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
+ mode: "{{ ceph_keyring_permissions }}"
+ no_log: "{{ no_log_on_ceph_key_tasks }}"
+ environment:
+ CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
+ CEPH_CONTAINER_BINARY: "{{ container_binary }}"
+ when: cephx | bool
- mds_group_name in group_names
- ansible_facts['os_family'] in ['Suse', 'RedHat']
-- name: create mds keyring
- ceph_key:
- name: "mds.{{ ansible_facts['hostname'] }}"
- cluster: "{{ cluster }}"
- user: client.bootstrap-mds
- user_key: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
- caps:
- mon: "allow profile mds"
- mds: "allow"
- osd: "allow rwx"
- dest: "/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}/keyring"
- import_key: false
- owner: ceph
- group: ceph
- mode: "{{ ceph_keyring_permissions }}"
- no_log: "{{ no_log_on_ceph_key_tasks }}"
- when: cephx | bool
-
- name: ensure systemd service override directory exists
file:
state: directory
--security-opt label=disable \
--memory={{ ceph_mds_docker_memory_limit }} \
--cpus={{ cpu_limit }} \
- -v /var/lib/ceph/mds:/var/lib/ceph/mds:z \
-v /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z \
+ -v /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
- -e CLUSTER={{ cluster }} \
- -e CEPH_DAEMON=MDS \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
{{ ceph_mds_docker_extra_env }} \
--name=ceph-mds-{{ ansible_facts['hostname'] }} \
- {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
+ --entrypoint=/usr/bin/ceph-mds \
+ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+ -f -i {{ ansible_facts['hostname'] }}
{% if container_binary == 'podman' %}
ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
{% else %}