Extract IPMI configuration out of role
This is required for Ironic enrolment as well as Virtual BMC configuration.
This commit is contained in:
parent
317bcf964c
commit
2d214adef3
@ -40,14 +40,13 @@
|
||||
# Loop over each physical network for each node allocated to this host.
|
||||
# Allocations are stored in localhost's vars.
|
||||
loop: >-
|
||||
{{ hostvars['localhost'].allocations.result[inventory_hostname]
|
||||
{{ hostvars.localhost.allocations.result[inventory_hostname]
|
||||
| default([]) | subelements('physical_networks') }}
|
||||
|
||||
- hosts: libvirt
|
||||
vars:
|
||||
# Allocations are stored in the localhost's vars.
|
||||
nodes: >-
|
||||
{{ hostvars['localhost'].allocations.result[inventory_hostname]
|
||||
{{ hostvars.localhost.allocations.result[inventory_hostname]
|
||||
| default([]) }}
|
||||
tasks:
|
||||
- name: Create Libvirt VMs
|
||||
@ -77,6 +76,9 @@
|
||||
name: virtualbmc-domain
|
||||
vars:
|
||||
vbmc_domain: "{{ domain }}"
|
||||
vbmc_ipmi_address: "{{ ipmi_address }}"
|
||||
vbmc_ipmi_username: "{{ ipmi_username }}"
|
||||
vbmc_ipmi_password: "{{ ipmi_password }}"
|
||||
vbmc_ipmi_port: "{{ ipmi_port_range_start + port_offset }}"
|
||||
vbmc_virtualenv_path: "{{ virtualenv_path }}"
|
||||
vbmc_log_directory: "{{ log_directory }}"
|
||||
|
@ -36,3 +36,13 @@ veth_node_source_suffix: '-tap'
|
||||
|
||||
# Directory in which to store Tenks logs.
|
||||
log_directory: /var/log/tenks/
|
||||
|
||||
# The address on which VBMC will listen for node IPMI communication.
|
||||
ipmi_address: 0.0.0.0
|
||||
# The range of ports available for use for node IPMI communication.
|
||||
ipmi_port_range_start: 6230
|
||||
ipmi_port_range_end: 6240
|
||||
# The username to use for node IPMI communication.
|
||||
ipmi_username: username
|
||||
# The password to use for node IPMI communication.
|
||||
ipmi_password: password
|
||||
|
@ -11,7 +11,3 @@ libvirt_pool_group: "{{ ansible_user_id }}"
|
||||
# By default, allow QEMU without hardware virtualisation since this is a
|
||||
# development tool.
|
||||
libvirt_require_vt: false
|
||||
|
||||
# The range of ports available for use for node IPMI traffic.
|
||||
ipmi_port_range_start: 6230
|
||||
ipmi_port_range_end: 6240
|
||||
|
@ -15,13 +15,10 @@ Role Variables
|
||||
- `vbmc_domain`: The name of the Libvirt domain to be added to Virtual BMC.
|
||||
- `vbmc_virtualenv_path`: The path to the virtualenv in which Virtual BMC is
|
||||
installed.
|
||||
- `vbmc_ipmi_listen_address`: The address on which Virtual BMC will listen for
|
||||
IPMI traffic. Default is 0.0.0.0.
|
||||
- `vbmc_ipmi_address`: The address on which Virtual BMC will listen for IPMI
|
||||
traffic.
|
||||
- `vbmc_ipmi_port`: The port on which Virtual BMC will listen for IPMI traffic.
|
||||
Default is 6230.
|
||||
- `vbmc_ipmi_username`: The IPMI username that Virtual BMC will use. Default is
|
||||
'username'.
|
||||
- `vbmc_ipmi_password`: The IPMI password that Virtual BMC will use. Default is
|
||||
'password'.
|
||||
- `vbmc_ipmi_username`: The IPMI username that Virtual BMC will use.
|
||||
- `vbmc_ipmi_password`: The IPMI password that Virtual BMC will use.
|
||||
- `vbmc_log_directory`: The directory in which to store Virtual BMC logs. If
|
||||
`None`, output will not be logged to a file. Default is `None`.
|
||||
not overridden from `None`, output will not be logged to a file.
|
||||
|
@ -1,13 +1,12 @@
|
||||
---
|
||||
# The address on which VBMC will listen for IPMI traffic for this domain.
|
||||
vbmc_ipmi_listen_address: 0.0.0.0
|
||||
vbmc_listen_address:
|
||||
# The port on which VBMC will listen for IPMI traffic for this domain.
|
||||
vbmc_ipmi_port: 6230
|
||||
vbmc_ipmi_port:
|
||||
# The IPMI username that VBMC will use.
|
||||
vbmc_ipmi_username: username
|
||||
vbmc_ipmi_username:
|
||||
# The IPMI password that VBMC will use.
|
||||
vbmc_ipmi_password: password
|
||||
|
||||
vbmc_ipmi_password:
|
||||
# The name of the Libvirt domain to be added to Virtual BMC.
|
||||
vbmc_domain:
|
||||
# The directory in which to store VBMC logs.
|
||||
|
@ -30,7 +30,7 @@
|
||||
# Check here to be safe.
|
||||
- name: Wait to ensure socket is closed
|
||||
wait_for:
|
||||
host: "{{ vbmc_ipmi_listen_address }}"
|
||||
host: "{{ vbmc_ipmi_address }}"
|
||||
port: "{{ vbmc_ipmi_port }}"
|
||||
state: stopped
|
||||
timeout: 15
|
||||
@ -41,7 +41,7 @@
|
||||
--port {{ vbmc_ipmi_port }}
|
||||
--username '{{ vbmc_ipmi_username }}'
|
||||
--password '{{ vbmc_ipmi_password }}'
|
||||
--address {{ vbmc_ipmi_listen_address }}
|
||||
--address {{ vbmc_ipmi_address }}
|
||||
become: true
|
||||
|
||||
- name: Ensure domain is started in VBMC
|
||||
|
Loading…
Reference in New Issue
Block a user