Add ctlplane-ip-range role

This patch adds this new role created from:
- validations/ctlplane-ip-range.yaml

Change-Id: Ib345539b86cd84cd3cc7f1b3ff3124dec4f0a5a2
Implements: blueprint validation-framework
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2019-02-25 15:08:38 +01:00
parent a1faf0b0a7
commit 1b51fc978f
5 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
- hosts: undercloud
vars:
metadata:
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.
groups:
- pre-introspection
ctlplane_iprange_min_size: 25
roles:
- ctlplane-ip-range

View File

@ -0,0 +1,2 @@
---
ctlplane_iprange_min_size: 25

View File

@ -0,0 +1,27 @@
galaxy_info:
author: TripleO Validations Team
company: Red Hat
license: Apache
min_ansible_version: 2.4
platforms:
- name: CentOS
versions:
- 7
- name: RHEL
versions:
- 7
categories:
- cloud
- baremetal
- system
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []

View File

@ -0,0 +1,29 @@
---
- name: Get the path of tripleo undercloud config file
become: true
hiera:
name: "tripleo_undercloud_conf_file"
- name: Get dhcp_start value from the undercloud.conf file
become: 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: "{{ dhcp_start.value|default('192.0.2.5') }}"
end: "{{ dhcp_end.value|default('192.0.2.24') }}"
min_size: "{{ ctlplane_iprange_min_size }}"

View File

@ -0,0 +1,8 @@
---
metadata:
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.
groups:
- pre-introspection