c80b593fb6
The old role will be kept and include ensure-docker for backwards compatability. Change-Id: Icb76a954b04631c405b09eb54343fd852a511b83
28 lines
1.0 KiB
YAML
28 lines
1.0 KiB
YAML
- hosts: all
|
|
vars:
|
|
tox_molecule_packages: "{{ _tox_molecule_packages | default([]) }}"
|
|
tasks:
|
|
- name: Gather variables for each operating system
|
|
include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- skip: true
|
|
files:
|
|
- "molecule-vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yaml"
|
|
- "molecule-vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
|
- "molecule-vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
|
- "molecule-vars/{{ ansible_distribution | lower }}.yaml"
|
|
- "molecule-vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yaml"
|
|
- "molecule-vars/{{ ansible_os_family | lower }}.yaml"
|
|
tags:
|
|
- always
|
|
|
|
- name: Install packages needed by molecule
|
|
become: true
|
|
package:
|
|
name: "{{ tox_molecule_packages }}"
|
|
when:
|
|
- (tox_molecule_packages | length) > 0
|
|
|
|
roles:
|
|
- role: ensure-docker
|