fix(validation): add CIDR prefix range check and Ubuntu version validation
This commit is contained in:
@@ -130,8 +130,15 @@
|
|||||||
) or (
|
) or (
|
||||||
os == "rhel"
|
os == "rhel"
|
||||||
and (os_version | string) is match("^(8|9|10)(\\.\\d+)?$")
|
and (os_version | string) is match("^(8|9|10)(\\.\\d+)?$")
|
||||||
|
) or (
|
||||||
|
os == "ubuntu"
|
||||||
|
and (os_version | string) is match("^(2[0-9])\\.04$")
|
||||||
|
) or (
|
||||||
|
os == "ubuntu-lts"
|
||||||
|
and (os_version | string) is match("^(2[0-9])\\.04$")
|
||||||
) or (
|
) or (
|
||||||
os in ["ubuntu", "ubuntu-lts"]
|
os in ["ubuntu", "ubuntu-lts"]
|
||||||
|
and (os_version | default('') | string | length) == 0
|
||||||
) or (
|
) or (
|
||||||
os in ["alpine", "archlinux", "opensuse", "void"]
|
os in ["alpine", "archlinux", "opensuse", "void"]
|
||||||
)
|
)
|
||||||
@@ -359,7 +366,8 @@
|
|||||||
that:
|
that:
|
||||||
- system_cfg.network.prefix is defined
|
- system_cfg.network.prefix is defined
|
||||||
- (system_cfg.network.prefix | int) > 0
|
- (system_cfg.network.prefix | int) > 0
|
||||||
fail_msg: "system.network.prefix is required when system.network.ip is set."
|
- (system_cfg.network.prefix | int) <= 32
|
||||||
|
fail_msg: "system.network.prefix must be between 1 and 32 when system.network.ip is set."
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
- name: Validate network interfaces entries
|
- name: Validate network interfaces entries
|
||||||
|
|||||||
Reference in New Issue
Block a user