When using Ansible OpenStack modules, if OS_CACERT is defined, then this will be passed as the cacert module argument. This ensures that non-standard CA certificate paths can be used. Change-Id: I2a2575b1fb0f149cc13c44526fc0167e68e07aab Story: 2004911 Task: 29261
33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
---
|
|
- name: Ensure required Python packages are installed
|
|
pip:
|
|
name: "{{ item.name }}"
|
|
version: "{{ item.version | default(omit) }}"
|
|
state: present
|
|
virtualenv: "{{ ironic_inspector_venv }}"
|
|
with_items:
|
|
- name: python-ironic-inspector-client
|
|
|
|
- name: Activate the virtualenv
|
|
include_role:
|
|
name: activate-virtualenv
|
|
vars:
|
|
activate_virtualenv_path: "{{ ironic_inspector_venv }}"
|
|
|
|
- name: Ensure introspection rules exist
|
|
os_ironic_inspector_rule:
|
|
auth_type: "{{ ironic_inspector_auth_type }}"
|
|
auth: "{{ ironic_inspector_auth }}"
|
|
cacert: "{{ ironic_inspector_cacert | default(omit, true) }}"
|
|
conditions: "{{ item.conditions }}"
|
|
actions: "{{ item.actions }}"
|
|
description: "{{ item.description | default(omit) }}"
|
|
uuid: "{{ item.uuid | default(item.description | to_uuid) | default(omit) }}"
|
|
state: present
|
|
inspector_url: "{{ ironic_inspector_url }}"
|
|
with_items: "{{ ironic_inspector_rules }}"
|
|
|
|
- name: Deactivate the virtualenv
|
|
include_role:
|
|
name: deactivate-virtualenv
|