File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,3 +12,6 @@ control_binaries:
1212 oc_mirror :
1313 url : " https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.20.15/oc-mirror.tar.gz"
1414 checksum : " sha256:59791d2e6b84ee380bc6a180e4e5e2006590ca1e0f146b0176819386e11e26d1"
15+ clairctl :
16+ url : " https://github.com/quay/clair/releases/download/v4.8.0/clairctl-linux-amd64"
17+ checksum : " sha256:eec1311f5e68165b49c8b4d024c83fc46285bdca2f37e756becf21d534551434"
Original file line number Diff line number Diff line change 1- - name : Get Clair Pod object from quay-enterprise
2- kubernetes.core.k8s_info :
3- kind : Pod
4- namespace : quay-enterprise
5- label_selectors :
6- - quay-component=clair-app
7- register : clair_pod_list
8-
9- - name : Set Pod fact and verify existence
10- ansible.builtin.set_fact :
11- clair_pod : " {{ clair_pod_list.resources[0] }}"
12- failed_when : clair_pod_list.resources | length == 0
13-
141- name : Create local export directory
152 ansible.builtin.file :
163 path : " {{ workingDir }}/data/clair"
3522 delivery_interval: 1m
3623
3724 - name : Export vulnerability data on Landing Zone
38- containers.podman.podman_container :
39- name : clair-exporter
40- image : " {{ clair_pod.spec.containers[0].image | regex_replace('^registry\\ .redhat\\ .io', quayHostname + ':8443') }}"
41- authfile : " {{ workingDir }}/config/pull-secret.quay.json"
42- tls_verify : no
43- rm : yes
44- volumes :
45- - " {{ workingDir }}/data/clair:/data:Z"
46- entrypoint : " /usr/bin/clairctl"
47- command : " --config /data/config.yaml export-updaters /data/updates.json.gz"
48- detach : false
25+ ansible.builtin.shell : |
26+ {{ workingDir }}/bin/clairctl --config {{ workingDir }}/data/clair/config.yaml export-updaters {{ workingDir }}/data/clair/updates.json.gz
4927
5028 - name : Ensure directory /var/www/html/clair/
5129 become : true
Original file line number Diff line number Diff line change 6161 src : " {{ workingDir }}/dist/oc-mirror.tar.gz"
6262 dest : " {{ workingDir }}/bin/"
6363 remote_src : true
64+
65+ - name : Download clairctl
66+ ansible.builtin.get_url :
67+ url : " {{ control_binaries.clairctl.url }}"
68+ dest : " {{ workingDir }}/bin/clairctl"
69+ checksum : " {{ control_binaries.clairctl.checksum }}"
70+ mode : " 0750"
You can’t perform that action at this time.
0 commit comments