Skip to content

Commit 2b143c7

Browse files
authored
Merge pull request #432 from ghoneycutt/fix_ssh_host_data_type
Fix data type for 'host' to allow for wildcards
2 parents b0eaa74 + 59378ea commit 2b143c7

File tree

7 files changed

+19
-33
lines changed

7 files changed

+19
-33
lines changed

.devcontainer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# devcontainer
22

33

4-
For format details, see https://aka.ms/devcontainer.json.
4+
For format details, see https://aka.ms/devcontainer.json.
55

66
For config options, see the README at:
77
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
8-
8+
99
``` json
1010
{
1111
"name": "Puppet Development Kit (Community)",

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
env:
6969
BUNDLE_WITHOUT: development:release
7070
BEAKER_debug: true
71-
name:
71+
name:
7272
steps:
7373
- name: Enable IPv6 on docker
7474
run: |

REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2671,7 +2671,7 @@ Alias of
26712671

26722672
```puppet
26732673
Struct[{
2674-
Optional['Host'] => Stdlib::Host,
2674+
Optional['Host'] => String[1],
26752675
Optional['Match'] => String[1],
26762676
Optional['AddKeysToAgent'] => Enum['yes', 'no', 'ask', 'confirm'],
26772677
Optional['AddressFamily'] => Enum['any', 'inet', 'inet6'],

manifests/config_file_client.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @summary Create config files to be used
1+
# @summary Create config files to be used
22
#
33
# Manage an entry in ~/.ssh/config for a particular user. Lines model the
44
# lines in each Host block.

manifests/config_file_server.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @summary Create config files to be used
1+
# @summary Create config files to be used
22
#
33
# Manage an entry in ~/.ssh/config for a particular user. Lines model the
44
# lines in each Host block.

spec/type_aliases/ssh_config_spec.rb

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,18 @@
276276

277277
context 'String[1]' do
278278
[
279-
'Match', 'BindAddress', 'BindInterface', 'CanonicalDomains', 'CanonicalizePermittedCNAMEs', 'CASignatureAlgorithms',
280-
'CertificateFile', 'Ciphers', 'ControlPath', 'ControlPersist', 'DynamicForward', 'EscapeChar', 'GlobalKnownHostsFile',
281-
'HostbasedAcceptedAlgorithms', 'HostKeyAlgorithms', 'HostKeyAlias', 'Hostname', 'IdentityAgent', 'IdentityFile',
282-
'IgnoreUnknown', 'Include', 'IPQoS', 'KbdInteractiveDevices', 'KexAlgorithms', 'KnownHostsCommand', 'LocalCommand',
283-
'LocalForward', 'LogVerbose', 'MACs', 'PermitRemoteOpen', 'PKCS11Provider', 'PreferredAuthentications', 'ProxyCommand',
284-
'ProxyJump', 'PubkeyAcceptedAlgorithms', 'RekeyLimit', 'RemoteCommand', 'RemoteForward', 'RevokedHostKeys',
285-
'SecurityKeyProvider', 'SendEnv', 'SetEnv', 'TunnelDevice', 'User', 'UserKnownHostsFile', 'XAuthLocation'
279+
'Match', 'BindAddress', 'BindInterface', 'CanonicalDomains',
280+
'CanonicalizePermittedCNAMEs', 'CASignatureAlgorithms',
281+
'CertificateFile', 'Ciphers', 'ControlPath', 'ControlPersist',
282+
'DynamicForward', 'EscapeChar', 'GlobalKnownHostsFile', 'Host',
283+
'HostbasedAcceptedAlgorithms', 'HostKeyAlgorithms', 'HostKeyAlias',
284+
'Hostname', 'IdentityAgent', 'IdentityFile', 'IgnoreUnknown', 'Include',
285+
'IPQoS', 'KbdInteractiveDevices', 'KexAlgorithms', 'KnownHostsCommand',
286+
'LocalCommand', 'LocalForward', 'LogVerbose', 'MACs', 'PermitRemoteOpen',
287+
'PKCS11Provider', 'PreferredAuthentications', 'ProxyCommand',
288+
'ProxyJump', 'PubkeyAcceptedAlgorithms', 'RekeyLimit', 'RemoteCommand',
289+
'RemoteForward', 'RevokedHostKeys', 'SecurityKeyProvider', 'SendEnv',
290+
'SetEnv', 'TunnelDevice', 'User', 'UserKnownHostsFile', 'XAuthLocation'
286291
].each do |directive|
287292
describe directive.inspect do
288293
[
@@ -337,25 +342,6 @@
337342
end
338343
end
339344

340-
context 'Stdlib::Host' do
341-
[
342-
'Host',
343-
].each do |directive|
344-
describe directive.inspect do
345-
[
346-
'string', 'host.domain.tld', '242.242.242.242', '242', nil, :keyword # FIXME: unsure why nil and :keyword are actually supported
347-
].each do |valid|
348-
it { is_expected.to allow_value(directive => valid) }
349-
end
350-
[
351-
'_invalid.domain.tld', 'ネット', ['array'], { 'ha' => 'sh' }, [], '', 242, 0x242, true, false, [nil], [nil, nil]
352-
].each do |invalid|
353-
it { is_expected.not_to allow_value(directive => invalid) }
354-
end
355-
end
356-
end
357-
end
358-
359345
context 'Stdlib::Port' do
360346
[
361347
'Port',

types/ssh_config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
type Ssh::Ssh_Config = Struct[
44
{
5-
Optional['Host'] => Stdlib::Host,
5+
Optional['Host'] => String[1],
66
Optional['Match'] => String[1],
77
Optional['AddKeysToAgent'] => Enum['yes', 'no', 'ask', 'confirm'],
88
Optional['AddressFamily'] => Enum['any', 'inet', 'inet6'],

0 commit comments

Comments
 (0)