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>
(cherry picked from commit 5417bbdf43
)
This commit is contained in:
parent
4478763f9d
commit
14c8416ae4
|
@ -4,7 +4,7 @@
|
||||||
# we have a few use cases where we need to use curl and rsync
|
# we have a few use cases where we need to use curl and rsync
|
||||||
# ANSIBLE0016: Tasks that run when changed should likely be handlers
|
# ANSIBLE0016: Tasks that run when changed should likely be handlers
|
||||||
# this requires refactoring roles, skipping for now
|
# this requires refactoring roles, skipping for now
|
||||||
SKIPLIST="ANSIBLE0006,ANSIBLE0016"
|
SKIPLIST="ANSIBLE0006,ANSIBLE0016,204,206,306,601,602"
|
||||||
|
|
||||||
pushd validations
|
pushd validations
|
||||||
for playbook in `find . -type f -regex '.*\.y[a]?ml'`; do
|
for playbook in `find . -type f -regex '.*\.y[a]?ml'`; do
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- hosts: undercloud
|
- hosts: undercloud
|
||||||
vars:
|
vars:
|
||||||
metadata:
|
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: >
|
description: >
|
||||||
Verify that the number of IP addresses defined in `dhcp_start` and
|
Verify that the number of IP addresses defined in `dhcp_start` and
|
||||||
`dhcp_end` fields in `undercloud.conf` is not too low.
|
`dhcp_end` fields in `undercloud.conf` is not too low.
|
||||||
|
@ -13,13 +13,27 @@
|
||||||
- name: Get the path of tripleo undercloud config file
|
- name: Get the path of tripleo undercloud config file
|
||||||
become: true
|
become: true
|
||||||
hiera: name="tripleo_undercloud_conf_file"
|
hiera: name="tripleo_undercloud_conf_file"
|
||||||
- name: Gather undercloud.conf values
|
|
||||||
|
- name: Get dhcp_start value from the undercloud.conf file
|
||||||
become: true
|
become: true
|
||||||
undercloud_conf:
|
ini:
|
||||||
undercloud_conf_path={{ tripleo_undercloud_conf_file }}
|
path: "{{ tripleo_undercloud_conf_file }}"
|
||||||
ignore_missing=true
|
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
|
- name: Check the size of the DHCP range for overcloud nodes
|
||||||
ip_range:
|
ip_range:
|
||||||
start: "{{ undercloud_conf.DEFAULT.dhcp_start|default('192.0.2.5') }}"
|
start: "{{ dhcp_start.value|default('192.0.2.5') }}"
|
||||||
end: "{{ undercloud_conf.DEFAULT.dhcp_end|default('192.0.2.24') }}"
|
end: "{{ dhcp_end.value|default('192.0.2.24') }}"
|
||||||
min_size: "{{ ctlplane_iprange_min_size }}"
|
min_size: "{{ ctlplane_iprange_min_size }}"
|
||||||
|
|
Loading…
Reference in New Issue