zuul-jobs/roles/upload-artifactory/tasks/main.yaml
Ian Wienand ac056cd6da upload-artifactory: fix version comparision
This check fails when Ansible updated to two-digit point releases; use
the version filter.

Change-Id: I4be5543f21017b747333657416eac8c3cae89838
2022-07-27 05:53:07 +10:00

14 lines
443 B
YAML

- name: Fail if run by an unsupported ansible version
fail:
msg: This role can only be used by ansible version 2.7 and greater.
when: ansible_version.full is version('2.7.0', '<')
- name: Upload artifacts
include_tasks: upload.yaml
loop: "{{ upload_artifactory_manifest.artifacts }}"
loop_control:
loop_var: zj_artifact
when:
- upload_artifactory_manifest is defined
- "'artifacts' in upload_artifactory_manifest"