]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
systemd: export params as a varaible
authorSeena Fallah <seenafallah@gmail.com>
Sat, 2 Mar 2024 21:06:14 +0000 (22:06 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 7 Mar 2024 20:03:33 +0000 (21:03 +0100)
This can help to have extra params or modify the existing ones via group vars.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
15 files changed:
group_vars/mdss.yml.sample
group_vars/mgrs.yml.sample
group_vars/mons.yml.sample
group_vars/osds.yml.sample
group_vars/rgws.yml.sample
roles/ceph-mds/defaults/main.yml
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/defaults/main.yml
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/templates/systemd-run.j2
roles/ceph-rgw/defaults/main.yml
roles/ceph-rgw/templates/ceph-radosgw.service.j2

index 592421b5c1b2f126e28228552a1f4e05adad8b19..c1f77d6afbe31765c280000822c0d5e91e2ccf08 100644 (file)
@@ -30,11 +30,15 @@ dummy:
 #ceph_mds_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 #ceph_mds_docker_cpu_limit: 4
 
-# we currently for MDS_NAME to hostname because of a bug in ceph-docker
-# fix here: https://github.com/ceph/ceph-docker/pull/770
-# this will go away soon.
-#ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_facts['hostname'] }}
 #ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+#ceph_mds_container_params:
+#  volumes:
+#    - /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z
+#    - /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z
+#  args:
+#    - -f
+#    - -i={{ ansible_facts['hostname'] }}
 
 
 ###########
index 252a5a6a6fc3d61ee05a2b5820ac84a1b70ba7b0..d353ed4e9cb10e2c079dfc4f0bd54c109fc17837 100644 (file)
@@ -40,12 +40,18 @@ dummy:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_mgr_docker_extra_env' variable.
 #ceph_mgr_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 #ceph_mgr_docker_cpu_limit: 1
 
-#ceph_mgr_docker_extra_env:
 #ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+#ceph_mgr_container_params:
+#  volumes:
+#    - /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared
+#    - /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z
+#  args:
+#    - -f
+#    - -i={{ ansible_facts['hostname'] }}
 
 
 ###########
index ac66172d09d64e8cd31648a9a55d5cd1c0e33e0e..c6892208b7e51b820b07649d64ced512cf2ee349 100644 (file)
@@ -44,18 +44,26 @@ dummy:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_mon_docker_extra_env' variable.
 #ceph_mon_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 #ceph_mon_docker_cpu_limit: 1
 #ceph_mon_container_listen_port: 3300
 
-# Use this variable to add extra env configuration to run your mon container.
-# If you want to set a custom admin keyring you can set this variable like following:
-# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }}
-#ceph_mon_docker_extra_env:
+# Use this variable to modify the configuration to run your mon container.
 #mon_docker_privileged: false
 #mon_docker_net_host: true
 #ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+#ceph_mon_container_params:
+#  volumes:
+#    - /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared
+#  args:
+#    - -f
+#    - --default-mon-cluster-log-to-file=false
+#    - --default-mon-cluster-log-to-stderr=true
+#    - -i={{ monitor_name }}
+#    - --mon-data=/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}
+#    - --public-addr={{ _current_monitor_address }}
+#    - --mon-initial-members={{ groups[mon_group_name] | join(',') }}
 
 
 ###########
index 2238716f3643e538712ba98991695df46084dc7a..430318d0ed5b94794bb8a2b8b1cf590617c1d818 100644 (file)
@@ -168,7 +168,6 @@ dummy:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_osd_docker_extra_env' variable.
 #ceph_osd_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 #ceph_osd_docker_cpu_limit: 4
 
@@ -189,9 +188,22 @@ dummy:
 
 # ACTIVATE DEVICE
 #
-#ceph_osd_docker_extra_env:
 #ceph_osd_numactl_opts: ""
 
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+#ceph_osd_container_params:
+#  volumes:
+#    - /dev:/dev
+#    - /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z
+#    - /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z
+#    - /var/run/udev/:/var/run/udev/
+#    - /run/lvm/:/run/lvm/
+#  envs:
+#    OSD_ID: ${OSD_ID}
+#  args:
+#    - -f
+#    - -i=${OSD_ID}
+
 ###########
 # SYSTEMD #
 ###########
index 885f40c87d2b382f6a1b0f00b8808f7f84189865..76e57a6e9698dfc1e4b933d4a950a0267406a1f7 100644 (file)
@@ -78,15 +78,21 @@ dummy:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_rgw_docker_extra_env' variable.
 #ceph_rgw_docker_memory_limit: "4096m"
 #ceph_rgw_docker_cpu_limit: 8
 # ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16"
 # ceph_rgw_docker_cpuset_mems: "0"
 
-#ceph_rgw_docker_extra_env:
 #ceph_config_keys: [] # DON'T TOUCH ME
 #rgw_config_keys: "/" # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+#ceph_rgw_container_params:
+#  volumes:
+#    - /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z
+#  args:
+#    - -f
+#    - -n=client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}
+#    - -k=/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring
 
 ###########
 # SYSTEMD #
index cd1342f85cde62cdf16b695d5ca7b7ac049e3eba..0e49d089eef2d52fc3f63185f2ac501dde632d61 100644 (file)
@@ -22,11 +22,15 @@ copy_admin_key: false
 ceph_mds_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 ceph_mds_docker_cpu_limit: 4
 
-# we currently for MDS_NAME to hostname because of a bug in ceph-docker
-# fix here: https://github.com/ceph/ceph-docker/pull/770
-# this will go away soon.
-ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_facts['hostname'] }}
 ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+ceph_mds_container_params:
+  volumes:
+    - /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z
+    - /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z
+  args:
+    - -f
+    - -i={{ ansible_facts['hostname'] }}
 
 
 ###########
index 9f56ec61b64a4b200e852925b7ef7a3dfe8779da..91661e1cce7212e2a192aafb2bc00577d345dcab 100644 (file)
@@ -28,22 +28,16 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --security-opt label=disable \
   --memory={{ ceph_mds_docker_memory_limit }} \
   --cpus={{ cpu_limit }} \
-  -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 \
-{% for v in ceph_common_container_params['volumes'] %}
+{% for v in ceph_common_container_params['volumes'] + ceph_mds_container_params['volumes'] | default([]) %}
   -v {{ v }} \
 {% endfor %}
-{% for k, v in ceph_common_container_params['envs'].items() %}
+{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mds_container_params['envs'] | default({}))).items() %}
   -e {{ k }}={{ v }} \
 {% endfor %}
-  {{ ceph_mds_docker_extra_env }} \
   --name=ceph-mds-{{ ansible_facts['hostname'] }} \
   --entrypoint=/usr/bin/ceph-mds \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-{% for arg in ceph_common_container_params['args'] %}
-  {{ arg }} \
-{% endfor %}
-  -f -i {{ ansible_facts['hostname'] }}
+  {{ (ceph_common_container_params['args'] + ceph_mds_container_params['args'] | default([])) | join(' ') }}
 {% if container_binary == 'podman' %}
 ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
 {% else %}
index cd58ef816d33a9680a4ab646a131e2dc70085075..731b7e058fc21de3705b021d182b84f8e12074c9 100644 (file)
@@ -32,12 +32,18 @@ ceph_mgr_packages:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_mgr_docker_extra_env' variable.
 ceph_mgr_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 ceph_mgr_docker_cpu_limit: 1
 
-ceph_mgr_docker_extra_env:
 ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+ceph_mgr_container_params:
+  volumes:
+    - /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared
+    - /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z
+  args:
+    - -f
+    - -i={{ ansible_facts['hostname'] }}
 
 
 ###########
index fe614b216162d9f1c5f9631886ad2469c224fd48..f8fac566e6b2207f57f664abaa9875e351153299 100644 (file)
@@ -27,23 +27,16 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --security-opt label=disable \
   --memory={{ ceph_mgr_docker_memory_limit }} \
   --cpus={{ ceph_mgr_docker_cpu_limit }} \
-{% for v in ceph_common_container_params['volumes'] %}
+{% for v in ceph_common_container_params['volumes'] + ceph_mgr_container_params['volumes'] | default([]) %}
   -v {{ v }} \
 {% endfor %}
-  -v /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared \
-  -v /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z \
-{% for k, v in ceph_common_container_params['envs'].items() %}
+{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mgr_container_params['envs'] | default({}))).items() %}
   -e {{ k }}={{ v }} \
 {% endfor %}
-  {{ ceph_mgr_docker_extra_env }} \
   --name=ceph-mgr-{{ ansible_facts['hostname'] }} \
   --entrypoint=/usr/bin/ceph-mgr \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-{% for arg in ceph_common_container_params['args'] %}
-  {{ arg }} \
-{% endfor %}
-  -f \
-  -i {{ ansible_facts['hostname'] }}
+  {{ (ceph_common_container_params['args'] + ceph_mgr_container_params['args'] | default([])) | join(' ') }}
 {% if container_binary == 'podman' %}
 ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
 {% else %}
index 66638bda0c13eec952322934abb2dbbbaee11a72..74c779d9c876f67ef3618968e5fab8619f4873ec 100644 (file)
@@ -36,18 +36,26 @@ client_admin_ceph_authtool_cap:
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_mon_docker_extra_env' variable.
 ceph_mon_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 ceph_mon_docker_cpu_limit: 1
 ceph_mon_container_listen_port: 3300
 
-# Use this variable to add extra env configuration to run your mon container.
-# If you want to set a custom admin keyring you can set this variable like following:
-# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }}
-ceph_mon_docker_extra_env:
+# Use this variable to modify the configuration to run your mon container.
 mon_docker_privileged: false
 mon_docker_net_host: true
 ceph_config_keys: [] # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+ceph_mon_container_params:
+  volumes:
+    - /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared
+  args:
+    - -f
+    - --default-mon-cluster-log-to-file=false
+    - --default-mon-cluster-log-to-stderr=true
+    - -i={{ monitor_name }}
+    - --mon-data=/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}
+    - --public-addr={{ _current_monitor_address }}
+    - --mon-initial-members={{ groups[mon_group_name] | join(',') }}
 
 
 ###########
index 7dc0e5cb7d8dc51d9cde189e2464b627f865e4a4..0f29470bc162c105c471317784ab8dc8b2d9f627 100644 (file)
@@ -28,10 +28,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
   --memory={{ ceph_mon_docker_memory_limit }} \
   --cpus={{ ceph_mon_docker_cpu_limit }} \
   --security-opt label=disable \
-{% for v in ceph_common_container_params['volumes'] %}
+{% for v in ceph_common_container_params['volumes'] + ceph_mon_container_params['volumes'] | default([]) %}
   -v {{ v }} \
 {% endfor %}
-  -v /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared \
 {% if ansible_facts['os_family'] == 'RedHat' -%}
   -v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted \
 {% endif -%}
@@ -41,19 +40,12 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
 {% if mon_docker_net_host | bool -%}
   --net=host \
 {% endif -%}
-{% for k, v in ceph_common_container_params['envs'].items() %}
+{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mon_container_params['envs'] | default({}))).items() %}
   -e {{ k }}={{ v }} \
 {% endfor %}
-  {{ ceph_mon_docker_extra_env }} \
   --entrypoint=/usr/bin/ceph-mon \
-  {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-{% for arg in ceph_common_container_params['args'] %}
-  {{ arg }} \
-{% endfor %}
-  -f \
-  --default-mon-cluster-log-to-file=false --default-mon-cluster-log-to-stderr=true \
-  -i {{ monitor_name }} --mon-data /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }} \
-  --public-addr {{ _current_monitor_address }} --mon-initial-members {{ groups[mon_group_name] | join(',') }}
+  {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  {{ (ceph_common_container_params['args'] + ceph_mon_container_params['args'] | default([])) | join(' ') }}
 {% if container_binary == 'podman' %}
 ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
 {% else %}
index 5e86c61867d7caee48378d6d72ec999b24a004e6..99019ee50e49fe0be4bda5f6807d98a70d134499 100644 (file)
@@ -160,7 +160,6 @@ ceph_config_keys: [] # DON'T TOUCH ME
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_osd_docker_extra_env' variable.
 ceph_osd_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m"
 ceph_osd_docker_cpu_limit: 4
 
@@ -181,9 +180,22 @@ ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }}
 
 # ACTIVATE DEVICE
 #
-ceph_osd_docker_extra_env:
 ceph_osd_numactl_opts: ""
 
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+ceph_osd_container_params:
+  volumes:
+    - /dev:/dev
+    - /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z
+    - /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z
+    - /var/run/udev/:/var/run/udev/
+    - /run/lvm/:/run/lvm/
+  envs:
+    OSD_ID: ${OSD_ID}
+  args:
+    - -f
+    - -i=${OSD_ID}
+
 ###########
 # SYSTEMD #
 ###########
index 73ba1b556fa3823a7aca255f6e5affb1a8835e9c..0dcaf79315066ab5e8f8e60d492d9686bdf46cea 100644 (file)
@@ -43,26 +43,16 @@ numactl \
 {% if ceph_osd_docker_cpuset_mems is defined -%}
 --cpuset-mems='{{ ceph_osd_docker_cpuset_mems }}' \
 {% endif -%}
-{% for v in ceph_common_container_params['volumes'] %}
+{% for v in ceph_common_container_params['volumes'] + ceph_osd_container_params['volumes'] | default([]) %}
   -v {{ v }} \
 {% endfor %}
--v /dev:/dev \
--v /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z \
--v /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z \
--v /var/run/udev/:/var/run/udev/ \
 {% if ansible_facts['distribution'] == 'Ubuntu' -%}
---security-opt apparmor:unconfined \
+--security-opt apparmor=unconfined \
 {% endif -%}
-{% for k, v in ceph_common_container_params['envs'].items() %}
+{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_osd_container_params['envs'] | default({}))).items() %}
 -e {{ k }}={{ v }} \
 {% endfor %}
--v /run/lvm/:/run/lvm/ \
--e OSD_ID=${OSD_ID} \
 --name=ceph-osd-${OSD_ID} \
 --entrypoint=/usr/bin/ceph-osd \
-{{ ceph_osd_docker_extra_env }} \
 {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-{% for arg in ceph_common_container_params['args'] %}
-  {{ arg }} \
-{% endfor %}
--f -i ${OSD_ID}
+{{ (ceph_common_container_params['args'] + ceph_osd_container_params['args'] | default([])) | join(' ') }}
index ac1eed2f6e4de498f297f01dbae6929437952eae..c53edd5c9acabd09a18cd09051eb19de0531d09a 100644 (file)
@@ -70,15 +70,21 @@ copy_admin_key: false
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_rgw_docker_extra_env' variable.
 ceph_rgw_docker_memory_limit: "4096m"
 ceph_rgw_docker_cpu_limit: 8
 # ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16"
 # ceph_rgw_docker_cpuset_mems: "0"
 
-ceph_rgw_docker_extra_env:
 ceph_config_keys: [] # DON'T TOUCH ME
 rgw_config_keys: "/" # DON'T TOUCH ME
+# If you want to add parameters, you should retain the existing ones and include the new ones.
+ceph_rgw_container_params:
+  volumes:
+    - /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z
+  args:
+    - -f
+    - -n=client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}
+    - -k=/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring
 
 ###########
 # SYSTEMD #
index add58124ba7ed82303fa8ba9ac660b7f13771e9b..524817653d6151bbe8392c209421c1c959661123 100644 (file)
@@ -34,28 +34,22 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   {% if ceph_rgw_docker_cpuset_mems is defined -%}
   --cpuset-mems="{{ ceph_rgw_docker_cpuset_mems }}" \
   {% endif -%}
-{% for v in ceph_common_container_params['volumes'] %}
+{% for v in ceph_common_container_params['volumes'] + ceph_rgw_container_params['volumes'] | default([]) %}
   -v {{ v }} \
 {% endfor %}
-  -v /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z \
-{% for k, v in ceph_common_container_params['envs'].items() %}
+{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_rgw_container_params['envs'] | default({}))).items() %}
   -e {{ k }}={{ v }} \
 {% endfor %}
-  {% if ansible_facts['os_family'] == 'RedHat' -%}
+{% if ansible_facts['os_family'] == 'RedHat' -%}
   -v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted \
-  {% endif -%}
-  {% if radosgw_frontend_ssl_certificate -%}
+{% endif -%}
+{% if radosgw_frontend_ssl_certificate -%}
   -v {{ radosgw_frontend_ssl_certificate }}:{{ radosgw_frontend_ssl_certificate }} \
-  {% endif -%}
-  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
+{% endif -%}
   --name=ceph-rgw-{{ ansible_facts['hostname'] }}-${INST_NAME} \
   --entrypoint=/usr/bin/radosgw \
-  {{ ceph_rgw_docker_extra_env }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-{% for arg in ceph_common_container_params['args'] %}
-  {{ arg }} \
-{% endfor %}
-  -f -n client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME} -k /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring
+  {{ (ceph_common_container_params['args'] + ceph_rgw_container_params['args'] | default([])) | join(' ') }}
 {% if container_binary == 'podman' %}
 ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
 {% else %}