diff --git a/roles/ceph-osd/tasks/container_options_facts.yml b/roles/ceph-osd/tasks/container_options_facts.yml index ea4265e76..f9f6b5347 100644 --- a/roles/ceph-osd/tasks/container_options_facts.yml +++ b/roles/ceph-osd/tasks/container_options_facts.yml @@ -1,32 +1,28 @@ --- -- name: set_fact docker_env_args '-e osd_bluestore=0 -e osd_filestore=1 -e osd_dmcrypt=0' +- name: set_fact container_env_args '-e osd_bluestore=0 -e osd_filestore=1 -e osd_dmcrypt=0' set_fact: - docker_env_args: -e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=0 + container_env_args: -e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=0 when: - - containerized_deployment | bool - osd_objectstore == 'filestore' - not dmcrypt | bool -- name: set_fact docker_env_args '-e osd_bluestore=0 -e osd_filestore=1 -e osd_dmcrypt=1' +- name: set_fact container_env_args '-e osd_bluestore=0 -e osd_filestore=1 -e osd_dmcrypt=1' set_fact: - docker_env_args: -e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=1 + container_env_args: -e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=1 when: - - containerized_deployment | bool - osd_objectstore == 'filestore' - dmcrypt | bool -- name: set_fact docker_env_args '-e osd_bluestore=1 -e osd_filestore=0 -e osd_dmcrypt=0' +- name: set_fact container_env_args '-e osd_bluestore=1 -e osd_filestore=0 -e osd_dmcrypt=0' set_fact: - docker_env_args: -e OSD_BLUESTORE=1 -e OSD_FILESTORE=0 -e OSD_DMCRYPT=0 + container_env_args: -e OSD_BLUESTORE=1 -e OSD_FILESTORE=0 -e OSD_DMCRYPT=0 when: - - containerized_deployment | bool - osd_objectstore == 'bluestore' - not dmcrypt | bool -- name: set_fact docker_env_args '-e osd_bluestore=1 -e osd_filestore=0 -e osd_dmcrypt=1' +- name: set_fact container_env_args '-e osd_bluestore=1 -e osd_filestore=0 -e osd_dmcrypt=1' set_fact: - docker_env_args: -e OSD_BLUESTORE=1 -e OSD_FILESTORE=0 -e OSD_DMCRYPT=1 + container_env_args: -e OSD_BLUESTORE=1 -e OSD_FILESTORE=0 -e OSD_DMCRYPT=1 when: - - containerized_deployment | bool - osd_objectstore == 'bluestore' - dmcrypt | bool diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index f35c49c3f..ab4e78ad7 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -47,6 +47,7 @@ - name: include container_options_facts.yml include_tasks: container_options_facts.yml + when: containerized_deployment | bool - name: include_tasks scenarios/lvm.yml include_tasks: scenarios/lvm.yml diff --git a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 index 0c2cab348..c12ffb299 100644 --- a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 +++ b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 @@ -41,11 +41,7 @@ numactl \ {% if ansible_distribution == 'Ubuntu' -%} --security-opt apparmor:unconfined \ {% endif -%} - {% if dmcrypt -%} - -e OSD_DMCRYPT=1 \ - {% else -%} - -e OSD_DMCRYPT=0 \ - {% endif -%} + {{ container_env_args }} \ -e CLUSTER={{ cluster }} \ {% if (ceph_tcmalloc_max_total_thread_cache | int) > 0 and osd_objectstore == 'filestore' -%} -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \