zuul-jobs/roles/ensure-packer/tasks/main.yaml
vass 32a3ce3f5a Adds roles to install and run hashicorp packer
Change-Id: I82274ef59eda00a735579082bbd37b64c0599c7d
2020-04-13 16:44:32 +02:00

12 lines
375 B
YAML

- name: Check installed packer version
command: "{{ packer_executable }} version"
register: packer_installed_version
failed_when: false
- name: Install packer
include_tasks: install-packer.yaml
when:
- packer_installed_version.rc != 0 or
"packer_version != (packer_installed_version.msg | \
regex_replace(packer_version_pattern, '\\g<version>'))"