Support for single and dual IPMI bridges
Added support for split out playbook executions based on use of ipmi_bridging, along with remaining columns that are presently known to be the minimum required items for deployment to be feasible.
This commit is contained in:
@@ -23,6 +23,12 @@ The CSV file has the following columns:
|
||||
8. Flavor (Not Used)
|
||||
9. Type (Not Used)
|
||||
10. Host UUID
|
||||
11. Host or Node name
|
||||
12. Host IP Address to be set
|
||||
13. ipmi_target_channel - Requires: ipmi_bridging set to single
|
||||
14. ipmi_target_address - Requires: ipmi_bridging set to single
|
||||
15. ipmi_transit_channel - Requires: ipmi_bridging set to dual
|
||||
16. ipmi_transit_address - Requires: ipmi_bridging set to dual
|
||||
|
||||
Example:
|
||||
00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
00:1c:ab:8a:97:eb,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec01
|
||||
00:2b:b7:65:83:19,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec02
|
||||
00:3a:ca:56:7d:2e,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec03
|
||||
00:4e:d5:45:6f:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec04
|
||||
00:5a:ed:39:57:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec05
|
||||
00:6a:f8:2b:41:35,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec06
|
||||
00:7f:9c:11:38:17,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec07
|
||||
00:1c:ab:8a:97:eb,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec01,hostname0,192.168.1.2,,,,
|
||||
00:2b:b7:65:83:19,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec02,hostname1,192.168.1.3,,,,
|
||||
00:3a:ca:56:7d:2e,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec03,hostname2,192.168.1.4,,,,
|
||||
00:4e:d5:45:6f:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec04,hostname3,192.168.1.5,,,,
|
||||
00:5a:ed:39:57:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec05,hostname4,192.168.1.6,,,,
|
||||
00:6a:f8:2b:41:35,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec06,hostname5,192.168.1.7,,,,
|
||||
00:7f:9c:11:38:17,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec07,hostname6,192.168.1.8,,,,
|
||||
|
||||
@@ -15,41 +15,12 @@
|
||||
- name: "Error if file does not exist."
|
||||
local_action: fail msg="The variable defined for baremetal_csv_file is not to a file. Please define a file and try again."
|
||||
when: test_baremetal_csv_file.stat.isreg == false
|
||||
- name: "Enroll Hardware"
|
||||
# The variable definitions below seem far from ideal, however there
|
||||
# seems to be no better way to handle CSV files for looping at this time.
|
||||
#
|
||||
# Ideally with_lines would be used with an include, however that support was removed in
|
||||
# Ansible 1.6 and no direct replacement exists.
|
||||
#
|
||||
# mac_address: "{{item.split(',')[1]}}"
|
||||
# username: "{{item.split(',')[2]}}"
|
||||
# password: "{{item.split(',')[3]}}"
|
||||
# management_address: "{{item.split(',')[4]}}"
|
||||
# cpu_cores: "{{item.split(',')[5]}}"
|
||||
# memory_MB: "{{item.split(',')[6]}}"
|
||||
# disk_MB: "{{item.split(',')[7]}}"
|
||||
os_ironic:
|
||||
auth_plugin: None
|
||||
auth: None
|
||||
ironic_url: "{{ ironic_url }}"
|
||||
driver: "pxe_ipmitool"
|
||||
# UUID determination TBD for mass enrollment.
|
||||
uuid: "{{item.split(',')[9]}}"
|
||||
state: present
|
||||
nics:
|
||||
- mac: "{{item.split(',')[0]}}"
|
||||
properties:
|
||||
cpus: "{{item.split(',')[4]}}"
|
||||
cpu_arch: "x86_64"
|
||||
ram: "{{item.split(',')[5]}}"
|
||||
disk_size: "{{item.split(',')[6]}}"
|
||||
driver_info:
|
||||
power:
|
||||
ipmi_address: "{{item.split(',')[3]}}"
|
||||
ipmi_username: "{{item.split(',')[1]}}"
|
||||
ipmi_password: "{{item.split(',')[2]}}"
|
||||
delegate_to: localhost
|
||||
with_lines:
|
||||
- cat {{ baremetal_csv_file }}
|
||||
|
||||
- name: "If no ipmi_bridging value set, or a value of no exists, execute standard sequence."
|
||||
include: standard_enroll.yaml
|
||||
when: ipmi_bridging is not defined or ipmi_bridging == "no"
|
||||
- name: "If ipmi_bridging is set to single, execute single bridge enrollment sequence.."
|
||||
include: ipmi_bridging_single_enroll.yaml
|
||||
when: ipmi_bridging is defined and ipmi_bridging == "single"
|
||||
- name: "If ipmi_bridging is set to single, execute dual bridge enrollment sequence.."
|
||||
include: ipmi_bridging_dual_enroll.yaml
|
||||
when: ipmi_bridging is defined and ipmi_bridging == "dual"
|
||||
|
||||
48
enroll/ipmi_bridging_dual_enroll.yaml
Normal file
48
enroll/ipmi_bridging_dual_enroll.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
- name: "Enroll Hardware"
|
||||
# The variable definitions below seem far from ideal, however there
|
||||
# seems to be no better way to handle CSV files for looping at this time.
|
||||
#
|
||||
# Ideally with_lines would be used with an include, however that support was removed in
|
||||
# Ansible 1.6 and no direct replacement exists.
|
||||
#
|
||||
# mac_address: "{{item.split(',')[1]}}"
|
||||
# username: "{{item.split(',')[2]}}"
|
||||
# password: "{{item.split(',')[3]}}"
|
||||
# management_address: "{{item.split(',')[4]}}"
|
||||
# cpu_cores: "{{item.split(',')[5]}}"
|
||||
# memory_MB: "{{item.split(',')[6]}}"
|
||||
# disk_MB: "{{item.split(',')[7]}}"
|
||||
# ipmi_target_channel: "{{item.split(',')[12]}}"
|
||||
# ipmi_target_address: "{{item.split(',')[13]}}"
|
||||
# ipmi_transit_channel: "{{item.split(',')[14]}}"
|
||||
# ipmi_transit_address: "{{item.split(',')[15]}}"
|
||||
#
|
||||
os_ironic:
|
||||
auth_plugin: None
|
||||
auth: None
|
||||
ironic_url: "{{ ironic_url }}"
|
||||
driver: "pxe_ipmitool"
|
||||
# UUID determination TBD for mass enrollment.
|
||||
uuid: "{{item.split(',')[9]}}"
|
||||
state: present
|
||||
nics:
|
||||
- mac: "{{item.split(',')[0]}}"
|
||||
properties:
|
||||
cpus: "{{item.split(',')[4]}}"
|
||||
cpu_arch: "x86_64"
|
||||
ram: "{{item.split(',')[5]}}"
|
||||
disk_size: "{{item.split(',')[6]}}"
|
||||
driver_info:
|
||||
power:
|
||||
ipmi_address: "{{item.split(',')[3]}}"
|
||||
ipmi_username: "{{item.split(',')[1]}}"
|
||||
ipmi_password: "{{item.split(',')[2]}}"
|
||||
ipmi_bridging: "dual"
|
||||
ipmi_target_channel: "{{item.split(',')[12]}}"
|
||||
ipmi_target_address: "{{item.split(',')[13]}}"
|
||||
ipmi_transit_channel: "{{item.split(',')[14]}}"
|
||||
ipmi_transit_address: "{{item.split(',')[15]}}"
|
||||
delegate_to: localhost
|
||||
with_lines:
|
||||
- cat {{ baremetal_csv_file }}
|
||||
43
enroll/ipmi_bridging_single_enroll.yaml
Normal file
43
enroll/ipmi_bridging_single_enroll.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
- name: "Enroll Hardware"
|
||||
# The variable definitions below seem far from ideal, however there
|
||||
# seems to be no better way to handle CSV files for looping at this time.
|
||||
#
|
||||
# Ideally with_lines would be used with an include, however that support was removed in
|
||||
# Ansible 1.6 and no direct replacement exists.
|
||||
#
|
||||
# mac_address: "{{item.split(',')[1]}}"
|
||||
# username: "{{item.split(',')[2]}}"
|
||||
# password: "{{item.split(',')[3]}}"
|
||||
# management_address: "{{item.split(',')[4]}}"
|
||||
# cpu_cores: "{{item.split(',')[5]}}"
|
||||
# memory_MB: "{{item.split(',')[6]}}"
|
||||
# disk_MB: "{{item.split(',')[7]}}"
|
||||
# ipmi_target_channel: "{{item.split(',')[12]}}"
|
||||
# ipmi_target_address: "{{item.split(',')[13]}}"
|
||||
os_ironic:
|
||||
auth_plugin: None
|
||||
auth: None
|
||||
ironic_url: "{{ ironic_url }}"
|
||||
driver: "pxe_ipmitool"
|
||||
# UUID determination TBD for mass enrollment.
|
||||
uuid: "{{item.split(',')[9]}}"
|
||||
state: present
|
||||
nics:
|
||||
- mac: "{{item.split(',')[0]}}"
|
||||
properties:
|
||||
cpus: "{{item.split(',')[4]}}"
|
||||
cpu_arch: "x86_64"
|
||||
ram: "{{item.split(',')[5]}}"
|
||||
disk_size: "{{item.split(',')[6]}}"
|
||||
driver_info:
|
||||
power:
|
||||
ipmi_address: "{{item.split(',')[3]}}"
|
||||
ipmi_username: "{{item.split(',')[1]}}"
|
||||
ipmi_password: "{{item.split(',')[2]}}"
|
||||
ipmi_bridging: "single"
|
||||
ipmi_target_channel: "{{item.split(',')[12]}}"
|
||||
ipmi_target_address: "{{item.split(',')[13]}}"
|
||||
delegate_to: localhost
|
||||
with_lines:
|
||||
- cat {{ baremetal_csv_file }}
|
||||
38
enroll/standard_enroll.yaml
Normal file
38
enroll/standard_enroll.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- name: "Enroll Hardware"
|
||||
# The variable definitions below seem far from ideal, however there
|
||||
# seems to be no better way to handle CSV files for looping at this time.
|
||||
#
|
||||
# Ideally with_lines would be used with an include, however that support was removed in
|
||||
# Ansible 1.6 and no direct replacement exists.
|
||||
#
|
||||
# mac_address: "{{item.split(',')[1]}}"
|
||||
# username: "{{item.split(',')[2]}}"
|
||||
# password: "{{item.split(',')[3]}}"
|
||||
# management_address: "{{item.split(',')[4]}}"
|
||||
# cpu_cores: "{{item.split(',')[5]}}"
|
||||
# memory_MB: "{{item.split(',')[6]}}"
|
||||
# disk_MB: "{{item.split(',')[7]}}"
|
||||
os_ironic:
|
||||
auth_plugin: None
|
||||
auth: None
|
||||
ironic_url: "{{ ironic_url }}"
|
||||
driver: "pxe_ipmitool"
|
||||
# UUID determination TBD for mass enrollment.
|
||||
uuid: "{{item.split(',')[9]}}"
|
||||
state: present
|
||||
nics:
|
||||
- mac: "{{item.split(',')[0]}}"
|
||||
properties:
|
||||
cpus: "{{item.split(',')[4]}}"
|
||||
cpu_arch: "x86_64"
|
||||
ram: "{{item.split(',')[5]}}"
|
||||
disk_size: "{{item.split(',')[6]}}"
|
||||
driver_info:
|
||||
power:
|
||||
ipmi_address: "{{item.split(',')[3]}}"
|
||||
ipmi_username: "{{item.split(',')[1]}}"
|
||||
ipmi_password: "{{item.split(',')[2]}}"
|
||||
delegate_to: localhost
|
||||
with_lines:
|
||||
- cat {{ baremetal_csv_file }}
|
||||
@@ -6,3 +6,12 @@ mysql_password:
|
||||
testing: true
|
||||
http_boot_folder: /httpboot
|
||||
latest_os_ironic_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic.py
|
||||
# ipv4_subnet_mask is intended for the static ipv4 address assignments.
|
||||
ipv4_subnet_mask: 255.255.255.0
|
||||
ipv4_gateway:
|
||||
ipv4_nameservers:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
# ipmi_bridging: Default undefined. Valid values: "no", "single", and "dual"
|
||||
# See http://docs.openstack.org/developer/ironic/_modules/ironic/drivers/modules/ipmitool.html
|
||||
#ipmi_bridging: no
|
||||
|
||||
Reference in New Issue
Block a user