b8e57ffc60
This change adds a new job to run the shake build system. Change-Id: Iffaf4e0675d91033b1b5d66c52d501f6bdc8acaf
32 lines
976 B
YAML
32 lines
976 B
YAML
- name: Make sure the role is run on supported distro
|
|
fail:
|
|
msg: |
|
|
This role supports Fedora only,
|
|
Add your distro package to: {{ opendev_url }}/roles/ensure-shake/vars/
|
|
when: "ansible_distribution != 'Fedora'"
|
|
vars:
|
|
opendev_url: https://opendev.org/zuul/zuul-jobs/src/branch/master/
|
|
|
|
- name: Check shake version
|
|
command: shake --version
|
|
failed_when: false
|
|
register: _shake_version
|
|
|
|
- block:
|
|
- name: Include OS-specific variables
|
|
include_vars: "{{ zj_distro_os }}"
|
|
loop_control:
|
|
loop_var: zj_distro_os
|
|
with_first_found:
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
|
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml"
|
|
- "{{ ansible_distribution }}.yaml"
|
|
- "{{ ansible_os_family }}.yaml"
|
|
|
|
- name: Install shake
|
|
package:
|
|
name: "{{ shake_packages }}"
|
|
state: present
|
|
become: yes
|
|
when: "_shake_version.rc != 0"
|