45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
---
|
|
- name: Ensure openstackclient is installed
|
|
# Only required to run on a single host.
|
|
hosts: controllers[0]
|
|
vars:
|
|
venv: "{{ ansible_env.PWD }}/shade-venv"
|
|
roles:
|
|
- role: openstackclient
|
|
openstackclient_venv: "{{ venv }}"
|
|
|
|
- name: Ensure introspection rules are registered in Ironic Inspector
|
|
# Only required to run on a single host.
|
|
hosts: controllers[0]
|
|
vars:
|
|
venv: "{{ ansible_env.PWD }}/shade-venv"
|
|
pre_tasks:
|
|
- name: Retrieve the IPA kernel Glance image UUID
|
|
shell: >
|
|
source {{ venv }}/bin/activate &&
|
|
openstack image show '{{ ipa_images_kernel_name }}' -f value -c id
|
|
changed_when: False
|
|
register: ipa_kernel_id
|
|
environment: "{{ openstack_auth_env }}"
|
|
|
|
- name: Retrieve the IPA ramdisk Glance image UUID
|
|
shell: >
|
|
source {{ venv }}/bin/activate &&
|
|
openstack image show '{{ ipa_images_ramdisk_name }}' -f value -c id
|
|
changed_when: False
|
|
register: ipa_ramdisk_id
|
|
environment: "{{ openstack_auth_env }}"
|
|
|
|
roles:
|
|
- role: ironic-inspector-rules
|
|
ironic_inspector_venv: "{{ venv }}"
|
|
ironic_inspector_auth_type: "{{ openstack_auth_type }}"
|
|
ironic_inspector_auth: "{{ openstack_auth }}"
|
|
ironic_inspector_rules: "{{ inspector_rules }}"
|
|
# These variables may be referenced in the introspection rules.
|
|
inspector_rule_var_ipmi_username: "{{ inspector_ipmi_username }}"
|
|
inspector_rule_var_ipmi_password: "{{ inspector_ipmi_password }}"
|
|
inspector_rule_var_lldp_switch_port_interface: "{{ inspector_lldp_switch_port_interface }}"
|
|
inspector_rule_var_deploy_kernel: "{{ ipa_kernel_id.stdout }}"
|
|
inspector_rule_var_deploy_ramdisk: "{{ ipa_ramdisk_id.stdout }}"
|