Skip to content

Commit

Permalink
Change Stdlib::Host to no longer accept subnets
Browse files Browse the repository at this point in the history
A host should be a specific IP and not allow a subnet.
  • Loading branch information
ekohl committed Jun 27, 2024
1 parent a01ed37 commit 48c51e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions spec/type_aliases/host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
'[email protected]',
'%.example.com',
'2001:0d8',
'192.0.2.0/24',
'2001:db8::/32',
].each do |value|
describe value.inspect do
it { is_expected.not_to allow_value(value) }
Expand Down
2 changes: 1 addition & 1 deletion types/host.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# @summary Validate a host (FQDN or IP address)
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address]
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address::Nosubnet]

0 comments on commit 48c51e6

Please sign in to comment.