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