Refactor a shade role out of ironic-inspector-roles

This commit is contained in:
Mark Goddard 2017-03-15 11:12:05 +00:00
parent 473d47310e
commit 0ea9003c6a
4 changed files with 37 additions and 22 deletions

View File

@ -0,0 +1,4 @@
---
dependencies:
- role: shade
shade_venv: "{{ ironic_inspector_venv }}"

View File

@ -1,25 +1,4 @@
---
- name: Ensure required packages are installed
yum:
name: "{{ item }}"
state: installed
become: True
with_items:
- gcc
- libffi-devel
- openssl-devel
- python-devel
- python-pip
- python-virtualenv
- name: Ensure the latest version of pip is installed
pip:
name: "{{ item.name }}"
state: latest
virtualenv: "{{ ironic_inspector_venv }}"
with_items:
- { name: pip }
- name: Ensure required Python packages are installed
pip:
name: "{{ item.name }}"
@ -28,7 +7,6 @@
virtualenv: "{{ ironic_inspector_venv }}"
with_items:
- name: python-ironic-inspector-client
- name: shade
- name: Set a fact to ensure Ansible uses the python interpreter in the virtualenv
set_fact:

View File

@ -0,0 +1,3 @@
---
# Path to a directory in which to create a virtualenv.
shade_venv:

View File

@ -0,0 +1,30 @@
---
- name: Ensure required packages are installed
yum:
name: "{{ item }}"
state: installed
become: True
with_items:
- gcc
- libffi-devel
- openssl-devel
- python-devel
- python-pip
- python-virtualenv
- name: Ensure the latest version of pip is installed
pip:
name: "{{ item.name }}"
state: latest
virtualenv: "{{ shade_venv }}"
with_items:
- { name: pip }
- name: Ensure required Python packages are installed
pip:
name: "{{ item.name }}"
version: "{{ item.version | default(omit) }}"
state: present
virtualenv: "{{ shade_venv }}"
with_items:
- name: shade