
This commit adds simple roles to manage: - libvirt service, domains, volumes, networks and pools. - redfish-emulator role installs sushy-tools from pip, together with support packages Please note, that libvirt roles are not meant to be completely idempotent, their main job is deploy temporary resources that for ci and gating purposes, to be tore down afterwards. Roles are specifically made to be simple to debug, and don't contain any complex logic to make them portable, flexible or idempotent. Change-Id: I2ff0138b5c95bea3445e242a2e5061651498f1ab
33 lines
995 B
YAML
33 lines
995 B
YAML
---
|
|
- hosts: primary
|
|
tasks:
|
|
- block:
|
|
- name: Ensuring ansible-lint package is present
|
|
fail:
|
|
msg: "Centos or RHEL is not yet supported"
|
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
|
|
|
- name: Ensuring ansible-lint package is present
|
|
become: true
|
|
apt:
|
|
name: ansible-lint
|
|
state: present
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
|
|
- name: find files to lint
|
|
find:
|
|
paths:
|
|
- "{{ zuul.project.src_dir }}/playbooks"
|
|
- "{{ zuul.project.src_dir }}/roles"
|
|
patterns:
|
|
- "*.yaml"
|
|
- "*.yml"
|
|
recurse: true
|
|
register: files_to_lint
|
|
|
|
# TODO (kkalynovskyi) develop suitable ansible-lint configuration
|
|
- name: run ansible-lint against found files
|
|
command: "ansible-lint {{ item.path }}"
|
|
with_items: "{{ files_to_lint.files }}"
|
|
changed_when: false
|