59dad009e9
- moved vars file under vars to avoid failure to load file (newer version raise error if you try to put vars outside vars/defaults as it will assume they are broken playbooks. - added missing file-modes on few tasks Change-Id: I7217469d089b655ee16cd038391cffa4197c8c83 Part-Of: https://review.opendev.org/c/zuul/zuul-jobs/+/773245
27 lines
1.1 KiB
YAML
27 lines
1.1 KiB
YAML
- hosts: all
|
|
vars:
|
|
tox_molecule_packages: "{{ _tox_molecule_packages | default([]) }}"
|
|
roles:
|
|
- role: ensure-docker
|
|
tasks:
|
|
- name: Gather variables for each operating system
|
|
include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- skip: true
|
|
files:
|
|
- "vars/molecule/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yaml"
|
|
- "vars/molecule/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
|
- "vars/molecule/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
|
- "vars/molecule/{{ ansible_distribution | lower }}.yaml"
|
|
- "vars/molecule/{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yaml"
|
|
- "vars/molecule/{{ ansible_os_family | lower }}.yaml"
|
|
tags:
|
|
- always
|
|
|
|
- name: Install packages needed by molecule
|
|
become: true
|
|
package:
|
|
name: "{{ tox_molecule_packages }}"
|
|
when:
|
|
- tox_molecule_packages | default(false)
|