summaryrefslogtreecommitdiffstats
path: root/ansible/roles/nexus/tasks/insert-images.yml
blob: bf1a7fa6b5c812dd10d1cc41a1e0c5178653c2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: Load docker images and push into registry
  block:
    - name: Register component name for docker login/load
      set_fact:
        component: "{{ (item.path | basename | splitext)[0] }}"

    - name: Docker login
      docker_login:
        registry: "{{ runtime_images[component].registry }}"
        username: admin
        password: admin123

    - name: Load and push component {{ component }}
      docker_image:
        name: "{{ runtime_images[component].registry }}{{ runtime_images[component].path }}"
        tag: "{{ runtime_images[component].tag }}"
        push: true
        load_path: "{{ item.path }}"
        source: load
        timeout: 120
      changed_when: false  # for idempotence