Move infrared plugin to infrared_plugin/ folder

Change-Id: I31290acb0e783145147f401af718e75611120ff0
This commit is contained in:
Federico Ressi 2020-04-21 17:25:34 +02:00
parent 2c795b1d4e
commit b77367e8bc
4 changed files with 52 additions and 22 deletions

View File

@ -0,0 +1,48 @@
---
- hosts: 'localhost'
tasks:
- name: "select test host from inventory"
set_fact:
test_host: '{{ item }}'
when:
- test_host is not defined
- item in hostvars
loop:
- "undercloud-0"
- "tempest"
- "primary"
- name: "ensure '{{ tobiko_src_dir }}' directory exists"
file:
dest: '{{ tobiko_src_dir }}'
register:
create_tobiko_src_dir
- name: "override tobiko_git_version because tobiko_git_refspec is '{{ tobiko_git_refspec }}'"
set_fact:
tobiko_git_version: 'FETCH_HEAD'
when:
- tobiko_git_refspec is defined
- '(tobiko_git_refspec | length) > 0'
- name: "checkout Tobiko files from '{{ tobiko_git_repo }}' to '{{ tobiko_src_dir }}'"
git:
dest: '{{ tobiko_src_dir }}'
repo: '{{ tobiko_git_repo }}'
refspec: '{{ tobiko_git_refspec | default(omit) }}'
version: '{{ tobiko_git_version | default(omit) }}'
remote: '{{ tobiko_git_remote | default(omit) }}'
when: create_tobiko_src_dir is changed
- name: "ensure Tobiko roles are accessible to IR plugin"
file:
src: '{{ tobiko_src_dir | realpath }}/roles'
dest: '{{ playbook_dir }}/roles'
state: link
- hosts: '{{ test_host | default("localhost") }}'
gather_facts: yes
tasks:
- include_role: name=tobiko-all

View File

@ -67,6 +67,7 @@ subparsers:
type: Value type: Value
help: Git URL from where to download tobiko files help: Git URL from where to download tobiko files
ansible_variable: tobiko_git_repo ansible_variable: tobiko_git_repo
default: 'https://opendev.org/x/tobiko.git'
tobiko-version: tobiko-version:
type: Value type: Value
help: Git version to be used for checking out Tobiko scripts help: Git version to be used for checking out Tobiko scripts
@ -82,7 +83,9 @@ subparsers:
tobiko-src-dir: tobiko-src-dir:
type: Value type: Value
help: Local directory where tobiko scripts are found help: Local directory where tobiko scripts are found
required: yes
ansible_variable: tobiko_src_dir ansible_variable: tobiko_src_dir
default: '{{ inventory_dir }}/src/tobiko'
- title: Configure stage - title: Configure stage
options: options:

View File

@ -1,21 +0,0 @@
---
- hosts: 'localhost'
tasks:
- name: "select test host from inventory"
set_fact:
test_host: '{{ item }}'
when:
- test_host is not defined
- item in hostvars
loop:
- "undercloud-0"
- "tempest"
- "primary"
- hosts: '{{ test_host | default("localhost") }}'
gather_facts: yes
any_errors_fatal: yes
roles:
- role: tobiko-all

View File

@ -201,7 +201,7 @@ setenv =
ANSIBLE_CONFIG={env:ANSIBLE_CONFIG:{toxinidir}/ansible.cfg} ANSIBLE_CONFIG={env:ANSIBLE_CONFIG:{toxinidir}/ansible.cfg}
ANSIBLE_INVENTORY={env:ANSIBLE_INVENTORY:{toxinidir}/ansible_hosts} ANSIBLE_INVENTORY={env:ANSIBLE_INVENTORY:{toxinidir}/ansible_hosts}
IR_HOME={env:IR_HOME:{envdir}/home/infrared} IR_HOME={env:IR_HOME:{envdir}/home/infrared}
IR_TOBIKO_PLUGIN={env:IR_TOBIKO_PLUGIN:{toxinidir}/roles} IR_TOBIKO_PLUGIN={env:IR_TOBIKO_PLUGIN:{toxinidir}/infrared_plugin}
IR_WORKSPACE_FILE={env:IR_WORKSPACE_FILE:{toxinidir}/workspace.tgz} IR_WORKSPACE_FILE={env:IR_WORKSPACE_FILE:{toxinidir}/workspace.tgz}
commands_pre = commands_pre =