aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-21 10:17:52 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-21 10:17:52 -0400
commit4c87f6bd1e2b4cc4ed2d605386983623230c53af (patch)
treeb20399ff99599113057f4394a5317440517f81e7 /manifests
parent383f919ebbdebfc1426319c6dcf05f87adc7a767 (diff)
downloadpuppet-sshd-4c87f6bd1e2b4cc4ed2d605386983623230c53af.tar.gz
puppet-sshd-4c87f6bd1e2b4cc4ed2d605386983623230c53af.tar.bz2
Add header to ssh_authorized_key when override_builting = 1
Diffstat (limited to 'manifests')
-rw-r--r--manifests/ssh_authorized_key.pp5
1 files changed, 3 insertions, 2 deletions
diff --git a/manifests/ssh_authorized_key.pp b/manifests/ssh_authorized_key.pp
index e93dde1..f942d62 100644
--- a/manifests/ssh_authorized_key.pp
+++ b/manifests/ssh_authorized_key.pp
@@ -51,10 +51,11 @@ define sshd::ssh_authorized_key(
case $options {
'absent': {
info("not setting any option for ssh_authorized_key: ${name}")
+ $header = "# HEADER: This file is managed by Puppet.\n"
file { $real_target:
ensure => $ensure,
- content => "${type} ${key}",
+ content => "${header}${type} ${key}",
owner => $real_user,
mode => '0600';
}
@@ -62,7 +63,7 @@ define sshd::ssh_authorized_key(
default: {
file { $real_target:
ensure => $ensure,
- content => "${options} ${type} ${key}",
+ content => "${header}${options} ${type} ${key}",
owner => $real_user,
mode => '0600';
}