Skip to content

Commit c94caa2

Browse files
committed
Fix require for sshd_config resource
Avoid fixing the permissions on a second puppet run
1 parent 0104c92 commit c94caa2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/profile/manifests/ssh.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
value => 'no',
4545
notify => Service['sshd'],
4646
target => '/etc/ssh/sshd_config.d/01-puppet.conf',
47-
require => File['/etc/ssh/sshd_config.d'],
47+
require => File['/etc/ssh/sshd_config.d/01-puppet.conf'],
4848
}
4949

5050
sshd_config { 'PermitRootLogin-sshd_config':
@@ -60,7 +60,7 @@
6060
value => $password_auth,
6161
notify => Service['sshd'],
6262
target => '/etc/ssh/sshd_config.d/01-puppet.conf',
63-
require => File['/etc/ssh/sshd_config.d'],
63+
require => File['/etc/ssh/sshd_config.d/01-puppet.conf'],
6464
}
6565

6666
sshd_config { 'PasswordAuthentication-sshd_config':
@@ -127,7 +127,7 @@
127127
value => 'publickey',
128128
target => '/etc/ssh/sshd_config.d/50-authenticationmethods.conf',
129129
notify => Service['sshd'],
130-
require => File['/etc/ssh/sshd_config.d'],
130+
require => File['/etc/ssh/sshd_config.d/50-authenticationmethods.conf'],
131131
}
132132

133133
sshd_config { 'tf_sshd_AuthorizedKeysFile':
@@ -137,7 +137,7 @@
137137
value => '/etc/ssh/authorized_keys.%u',
138138
target => '/etc/ssh/sshd_config.d/50-authenticationmethods.conf',
139139
notify => Service['sshd'],
140-
require => File['/etc/ssh/sshd_config.d'],
140+
require => File['/etc/ssh/sshd_config.d/50-authenticationmethods.conf'],
141141
}
142142

143143
$tf_public_key = lookup('terraform.data.tf_public_key')

0 commit comments

Comments
 (0)