Skip to content

Commit 857dd7a

Browse files
committed
Testing to see if we can exclude puppet6 builds because they have an old openssh
1 parent 12a157e commit 857dd7a

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

spec/acceptance/user_spec.rb

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@
1313
ensure => directory,
1414
before => Accounts::User['hunner'],
1515
}
16+
if $facts['puppetversion'][0] == '6' {
17+
$key_test = [
18+
'ssh-rsa #{test_key} vagrant',
19+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
20+
]
21+
}
22+
else {
23+
$key_test = [
24+
'ssh-rsa #{test_key} vagrant',
25+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
26+
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
27+
'[email protected] #{ecdsa_sk_test_key} vagrant4'
28+
]
29+
}
30+
1631
accounts::user { 'hunner':
1732
groups => ['root'],
1833
password => 'hi',
@@ -22,12 +37,7 @@
2237
managevim => false,
2338
bashrc_content => file('accounts/shell/bashrc'),
2439
bash_profile_content => file('accounts/shell/bash_profile'),
25-
sshkeys => [
26-
'ssh-rsa #{test_key} vagrant',
27-
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
28-
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
29-
'[email protected] #{ecdsa_sk_test_key} vagrant4'
30-
],
40+
sshkeys => $key_test,
3141
}
3242
PUPPETCODE
3343

@@ -45,6 +55,21 @@
4555
ensure => directory,
4656
before => Accounts::User['hunner'],
4757
}
58+
if $facts['puppetversion'][0] == '6' {
59+
$key_test = [
60+
'ssh-rsa #{test_key} vagrant',
61+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2'
62+
]
63+
}
64+
else {
65+
$key_test = [
66+
'ssh-rsa #{test_key} vagrant',
67+
'command="/bin/echo Hello",from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
68+
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
69+
'[email protected] #{ecdsa_sk_test_key} vagrant4'
70+
]
71+
}
72+
4873
accounts::user { 'hunner':
4974
groups => ['root'],
5075
password => 'hi',
@@ -54,12 +79,7 @@
5479
managevim => true,
5580
bashrc_content => file('accounts/shell/bashrc'),
5681
bash_profile_content => file('accounts/shell/bash_profile'),
57-
sshkeys => [
58-
'ssh-rsa #{test_key} vagrant',
59-
'from="myhost.example.com,192.168.1.1" ssh-rsa #{test_key} vagrant2',
60-
'ecdsa-sha2-nistp256 #{ecdsa_test_key} vagrant3',
61-
'[email protected] #{ecdsa_sk_test_key} vagrant4'
62-
],
82+
sshkeys => $key_test,
6383
}
6484
PUPPETCODE
6585

0 commit comments

Comments
 (0)