-
Notifications
You must be signed in to change notification settings - Fork 6
/
bundle.yml
executable file
·36 lines (33 loc) · 1.47 KB
/
bundle.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
#!/usr/local/bin/ansible-playbook --inventory=inventory
- name: '{{ name_vendor }} | Koffer | bundle.yml'
hosts: local
vars_files:
- 'vars/global.yml'
vars:
module: "bundle"
ansible_name_module: "{{ ansible_name }} | {{ module }}"
redhat_quay_pull_file: '{{ dir_artifacts }}/.docker/master.json }}'
tasks:
- name: '{{ ansible_name_module }} | file:absent | Purge pre-existing operator bundles'
file:
path: '{{ item }}'
state: absent
loop:
- '{{ local_home }}/deploy/bundle/koffer-bundle.collector-apps.tar'
- '{{ local_home }}/deploy/bundle/koffer-bundle.collector-apps.tar.sha256'
- name: '{{ ansible_name_module }} | command:tar | build tarball bundle of all artifacts'
command:
"tar -cv -f {{ local_home }}/deploy/bundle/koffer-bundle.collector-apps.tar -C {{ local_home }} deploy"
args:
creates: '{{ local_home }}/deploy/bundle/koffer-bundle.collector-apps.tar'
warn: false
- name: '{{ ansible_name_module }} | stat:sha256 | SHA koffer-bundle.collector-apps.tar'
command: 'sha256sum koffer-bundle.collector-apps.tar'
args:
warn: false
chdir: '{{ local_home }}/deploy/bundle'
register: bundle_sha
- name: '{{ ansible_name_module }} | copy:content.sha256 | Create Sha256 Verification file'
copy:
content: '{{ bundle_sha.stdout }}'
dest: '{{ local_home }}/deploy/bundle/koffer-bundle.collector-apps.tar.sha256'