Add support for limiting target iDRACs in idrac-bootstrap.yml
This commit is contained in:
parent
be637218eb
commit
19e5d27984
@ -121,6 +121,11 @@
|
|||||||
- name: Ensure iDRACs are bootstrapped
|
- name: Ensure iDRACs are bootstrapped
|
||||||
hosts: "{{ idrac_bootstrap_switch_group }}"
|
hosts: "{{ idrac_bootstrap_switch_group }}"
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
# Set this to a colon-separated list of idrac hostnames to bootstrap.
|
||||||
|
# If unset, all idracs will be bootstrapped.
|
||||||
|
idrac_limit: ""
|
||||||
|
idrac_limit_list: "{{ idrac_limit.split(':') }}"
|
||||||
# This is a separate play so that we can apply the serial keyword.
|
# This is a separate play so that we can apply the serial keyword.
|
||||||
serial: 1
|
serial: 1
|
||||||
tasks:
|
tasks:
|
||||||
@ -142,7 +147,9 @@
|
|||||||
idrac_network_ip: "{{ idrac_network_ips[idrac_port_description] }}"
|
idrac_network_ip: "{{ idrac_network_ips[idrac_port_description] }}"
|
||||||
idrac_bootstrap_controller: "{{ hostvars[groups[idrac_bootstrap_controller_group][0]].ansible_host }}"
|
idrac_bootstrap_controller: "{{ hostvars[groups[idrac_bootstrap_controller_group][0]].ansible_host }}"
|
||||||
with_dict: "{{ switch_interface_config }}"
|
with_dict: "{{ switch_interface_config }}"
|
||||||
when: "{{ item.value.description | default in idrac_network_ips }}"
|
when: >
|
||||||
|
{{ item.value.description | default in idrac_network_ips and
|
||||||
|
(not idrac_limit or item.value.description | default in idrac_limit_list) }}
|
||||||
|
|
||||||
# 4. Remove the temporary bootstrap VLAN from the switch.
|
# 4. Remove the temporary bootstrap VLAN from the switch.
|
||||||
- name: Ensure the bootstrap VLAN is removed from switches
|
- name: Ensure the bootstrap VLAN is removed from switches
|
||||||
|
Loading…
x
Reference in New Issue
Block a user