-
Notifications
You must be signed in to change notification settings - Fork 6
/
images.yml
executable file
·85 lines (78 loc) · 2.74 KB
/
images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/local/bin/ansible-playbook --inventory=inventory
- name: '{{ name_vendor }} | Koffer | images.yml'
hosts: local
vars_files:
- 'vars/global.yml'
- 'vars/synker.yml'
vars:
module: "images"
ansible_name_module: "{{ ansible_name }} | {{ module }}"
tasks:
- name: '{{ ansible_name_module }} | file:absent | Purge Pre-Existing Artifacts'
file:
path: "{{ dir_deploy }}/deploy/mirror/docker"
state: absent
- name: '{{ ansible_name_module }} | file:directory | Place Artifacts Directory'
file:
path: "{{ dir_deploy }}/images"
state: directory
- name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_redhat_io }}'
command:
argv:
- skopeo
- copy
- --format=v2s2
- 'docker://{{ url_registry_redhat_io }}/{{ item }}'
- 'docker://localhost:5000/{{ item }}'
with_items:
- '{{ images_apps_redhat_io }}'
- name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_redhat }} '
command:
argv:
- skopeo
- copy
- --format=v2s2
- 'docker://{{ url_registry_redhat }}/{{ item }}'
- 'docker://localhost:5000/{{ item }}'
with_items:
- '{{ images_apps_redhat }}'
- name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_docker }}'
command:
argv:
- skopeo
- copy
- --format=v2s2
- 'docker://{{ url_registry_docker }}/{{ item }}'
- 'docker://localhost:5000/{{ item }}'
with_items:
- '{{ images_apps_docker }}'
# - name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_dsop }}'
# command:
# argv:
# - skopeo
# - copy
# - --format=v2s2
# - 'docker://{{ url_registry_dsop }}/{{ item }}'
# - 'docker://localhost:5000/{{ item }}'
# with_items:
# - '{{ images_apps_dsop }}'
- name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_k8s }}'
command:
argv:
- skopeo
- copy
- --format=v2s2
- 'docker://{{ url_registry_k8s }}/{{ item }}'
- 'docker://localhost:5000/{{ item }}'
with_items:
- '{{ images_apps_k8s }}'
- name: '{{ ansible_name_module }} | command:skopeo.copy | Pull App Images | {{ url_registry_quay }}'
command:
argv:
- skopeo
- copy
- --format=v2s2
- 'docker://{{ url_registry_quay }}/{{ item }}'
- 'docker://localhost:5000/{{ item }}'
with_items:
- '{{ images_apps_quay }}'