ceph-osd: refact `docker_exec_start_osd`

This commit drops nested jinja construction in this set_fact task.
It also rename it to `container_exec_start_osd`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ff95fa9c32)
pull/5909/head
Guillaume Abrioux 2020-10-02 11:00:29 +02:00
parent 88a4d39978
commit 32be163360
1 changed files with 3 additions and 3 deletions

View File

@ -19,12 +19,12 @@
changed_when: false changed_when: false
register: osd_ids_non_container register: osd_ids_non_container
- name: set_fact docker_exec_start_osd - name: set_fact container_exec_start_osd
set_fact: set_fact:
docker_exec_start_osd: "{{ '{{ container_binary }} run --rm --net=host --privileged=true -v /var/run/udev/:/var/run/udev/:z -v /run/lvm/:/run/lvm/ -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else 'ceph-volume' }}" container_exec_start_osd: "{{ container_binary + ' run --rm --net=host --privileged=true -v /var/run/udev/:/var/run/udev/:z -v /run/lvm/:/run/lvm/ -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph-volume' }}"
- name: collect osd ids - name: collect osd ids
command: "{{ docker_exec_start_osd }} lvm list --format json" command: "{{ container_exec_start_osd }} lvm list --format json"
changed_when: false changed_when: false
failed_when: false failed_when: false
register: ceph_osd_ids register: ceph_osd_ids