Refactor a shade role out of ironic-inspector-roles
This commit is contained in:
parent
473d47310e
commit
0ea9003c6a
4
ansible/roles/ironic-inspector-rules/meta/main.yml
Normal file
4
ansible/roles/ironic-inspector-rules/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: shade
|
||||||
|
shade_venv: "{{ ironic_inspector_venv }}"
|
@ -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
|
- name: Ensure required Python packages are installed
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
@ -28,7 +7,6 @@
|
|||||||
virtualenv: "{{ ironic_inspector_venv }}"
|
virtualenv: "{{ ironic_inspector_venv }}"
|
||||||
with_items:
|
with_items:
|
||||||
- name: python-ironic-inspector-client
|
- name: python-ironic-inspector-client
|
||||||
- name: shade
|
|
||||||
|
|
||||||
- name: Set a fact to ensure Ansible uses the python interpreter in the virtualenv
|
- name: Set a fact to ensure Ansible uses the python interpreter in the virtualenv
|
||||||
set_fact:
|
set_fact:
|
||||||
|
3
ansible/roles/shade/defaults/main.yml
Normal file
3
ansible/roles/shade/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
# Path to a directory in which to create a virtualenv.
|
||||||
|
shade_venv:
|
30
ansible/roles/shade/tasks/main.yml
Normal file
30
ansible/roles/shade/tasks/main.yml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user