bc4899baec2292506dc3b2262abb7981d419d619
[apex.git] / lib / ansible / playbooks / patch_containers.yml
1 ---
2   - name: "Pull docker image to ensure it exists locally: {{ item }}"
3     shell: docker pull {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo
4   - name: "Find docker image user {{ item }}"
5     shell: >
6       docker inspect --format='{{ '{{' }}.ContainerConfig.User{{ '}}' }}'
7       {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo
8     register: user_result
9   - name: "Patch docker image {{ item }}"
10     shell: >
11       cd /home/stack/containers/{{ item }} && docker build
12       --build-arg REAL_USER={{ user_result.stdout }}
13       -t {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex .