Skip to content

Commit

Permalink
ceph-osd: refact docker_exec_start_osd
Browse files Browse the repository at this point in the history
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 ff95fa9)
  • Loading branch information
guits committed Oct 6, 2020
1 parent 88a4d39 commit 32be163
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roles/ceph-osd/tasks/start_osds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
changed_when: false
register: osd_ids_non_container

- name: set_fact docker_exec_start_osd
- name: set_fact container_exec_start_osd
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
command: "{{ docker_exec_start_osd }} lvm list --format json"
command: "{{ container_exec_start_osd }} lvm list --format json"
changed_when: false
failed_when: false
register: ceph_osd_ids
Expand Down

0 comments on commit 32be163

Please sign in to comment.