fix(validation): add CIDR prefix range check and Ubuntu version validation
This commit is contained in:
@@ -130,8 +130,15 @@
|
||||
) or (
|
||||
os == "rhel"
|
||||
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 (
|
||||
os in ["ubuntu", "ubuntu-lts"]
|
||||
and (os_version | default('') | string | length) == 0
|
||||
) or (
|
||||
os in ["alpine", "archlinux", "opensuse", "void"]
|
||||
)
|
||||
@@ -359,7 +366,8 @@
|
||||
that:
|
||||
- system_cfg.network.prefix is defined
|
||||
- (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
|
||||
|
||||
- name: Validate network interfaces entries
|
||||
|
||||
Reference in New Issue
Block a user