]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
docker: do not hardcode image and user name 708/head
authorSébastien Han <seb@redhat.com>
Tue, 12 Apr 2016 10:01:53 +0000 (12:01 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 12 Apr 2016 10:01:53 +0000 (12:01 +0200)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-mds/tasks/docker/dirs_permissions.yml
roles/ceph-mon/tasks/docker/dirs_permissions.yml
roles/ceph-osd/tasks/docker/dirs_permissions.yml
roles/ceph-restapi/tasks/docker/dirs_permissions.yml
roles/ceph-rgw/tasks/docker/dirs_permissions.yml

index ba5818294b5a0df7d2e5c310ca6c6711e60a53b8..258a179679c1a6aae47928bec4080d3741a8d51f 100644 (file)
@@ -7,7 +7,7 @@
 # NOTE (leseb): we can not use docker inspect with 'format filed' because of
 # https://github.com/ansible/ansible/issues/10156
 - name: inspect ceph version
-  shell: docker inspect docker.io/ceph/daemon | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
+  shell: docker inspect docker.io/"{{ ceph_mds_docker_username }}"/"{{ ceph_mds_docker_imagename }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
   changed_when: false
   failed_when: false
   run_once: true
index a33a38edf84c028d47747b7beb2efd788ff459ba..99f1e9a4fcb368f0d5f5f2aeabc03b191e618a0b 100644 (file)
@@ -7,7 +7,7 @@
 # NOTE (leseb): we can not use docker inspect with 'format filed' because of
 # https://github.com/ansible/ansible/issues/10156
 - name: inspect ceph version
-  shell: docker inspect docker.io/ceph/daemon | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
+  shell: docker inspect docker.io/"{{ ceph_mon_docker_username }}"/"{{ ceph_mon_docker_imagename }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
   changed_when: false
   failed_when: false
   run_once: true
index d0c49cf9ce42de27be55287b0680a743d76bf33e..785f06898be6ea121a6e52f7817f7779aec2d12e 100644 (file)
@@ -7,7 +7,7 @@
 # NOTE (leseb): we can not use docker inspect with 'format filed' because of
 # https://github.com/ansible/ansible/issues/10156
 - name: inspect ceph version
-  shell: docker inspect docker.io/ceph/daemon | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
+  shell: docker inspect docker.io/"{{ ceph_osd_docker_username }}"/"{{ ceph_osd_docker_imagename }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
   changed_when: false
   failed_when: false
   run_once: true
index 99dbe409404fc638925a483d7f07108e660b71e4..aba95709f748f28955ad5042e77564375b4bca9c 100644 (file)
@@ -1,6 +1,6 @@
 ---
 - name: inspect ceph version
-  shell: "docker inspect --format '{{ index (index .Config.Env) 3 }}' docker.io/{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }} | cut -d '=' -f '2'"
+  shell: docker inspect docker.io/"{{ ceph_restapi_docker_username }}"/"{{ ceph_restapi_docker_imagename }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
   changed_when: false
   failed_when: false
   run_once: true
index d4046e616c7b62ef19653ebc214ce7fdf31d7e3d..8d53d815a1dbab22842c9a0fac52b9c9788d7350 100644 (file)
@@ -7,7 +7,7 @@
 # NOTE (leseb): we can not use docker inspect with 'format filed' because of
 # https://github.com/ansible/ansible/issues/10156
 - name: inspect ceph version
-  shell: docker inspect docker.io/ceph/daemon | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
+  shell: docker inspect docker.io/"{{ ceph_rgw_docker_username }}"/"{{ ceph_rgw_docker_imagename }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
   changed_when: false
   failed_when: false
   run_once: true