Fix ctlplane-ip-range validations
The `undercloud.conf` file has now 2 sections (DEFAULT and ctlplane-subnet). A small numbers of parameters have been deprecated and moved to the ctlplane-subnet section. Morever, the `undercloud_conf` custom plugin has some issues to generate facts coming from the 'undercloud.conf' file due to the new section. This patch proposes to use the 'ini' custom plugin to get parameter's values from the undercloud.conf file instead of using the 'undercloud_conf' custom plugin. Resolves: rhbz#1660075 Change-Id: I7689e1c8f7f44058b0ad44318c5eef522ddfad52 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
489a67b2ca
commit
5417bbdf43
|
@ -2,7 +2,7 @@
|
|||
- hosts: undercloud
|
||||
vars:
|
||||
metadata:
|
||||
name: Check the number of IP addresses available to overcloud nodes
|
||||
name: Check the number of IP addresses available for the overcloud nodes
|
||||
description: >
|
||||
Verify that the number of IP addresses defined in `dhcp_start` and
|
||||
`dhcp_end` fields in `undercloud.conf` is not too low.
|
||||
|
@ -13,13 +13,27 @@
|
|||
- name: Get the path of tripleo undercloud config file
|
||||
become: true
|
||||
hiera: name="tripleo_undercloud_conf_file"
|
||||
- name: Gather undercloud.conf values
|
||||
|
||||
- name: Get dhcp_start value from the undercloud.conf file
|
||||
become: true
|
||||
undercloud_conf:
|
||||
undercloud_conf_path={{ tripleo_undercloud_conf_file }}
|
||||
ignore_missing=true
|
||||
ini:
|
||||
path: "{{ tripleo_undercloud_conf_file }}"
|
||||
section: ctlplane-subnet
|
||||
key: dhcp_start
|
||||
ignore_missing_file: True
|
||||
register: dhcp_start
|
||||
|
||||
- name: Get dhcp_end value from the undercloud.conf file
|
||||
become: true
|
||||
ini:
|
||||
path: "{{ tripleo_undercloud_conf_file }}"
|
||||
section: ctlplane-subnet
|
||||
key: dhcp_end
|
||||
ignore_missing_file: True
|
||||
register: dhcp_end
|
||||
|
||||
- name: Check the size of the DHCP range for overcloud nodes
|
||||
ip_range:
|
||||
start: "{{ undercloud_conf.DEFAULT.dhcp_start|default('192.0.2.5') }}"
|
||||
end: "{{ undercloud_conf.DEFAULT.dhcp_end|default('192.0.2.24') }}"
|
||||
start: "{{ dhcp_start.value|default('192.0.2.5') }}"
|
||||
end: "{{ dhcp_end.value|default('192.0.2.24') }}"
|
||||
min_size: "{{ ctlplane_iprange_min_size }}"
|
||||
|
|
Loading…
Reference in New Issue