We recently ran into this bug again when we tried to switch the user type to "eval_generate" when calculating ssh_authorized_keys to purge (see PUP-11320). So a simple manifest fails to purge the unmanaged authorized key:
# cat <<END > /tmp/authorized_keys
> ssh-rsa key comment
> END
# cat manifest.pp
package { 'puppet-agent':
ensure => present,
}
user { "root":
purge_ssh_keys => '/tmp/authorized_keys',
}
# puppet apply manifest.pp
Notice: Compiled catalog for XXX in environment production in 0.31 seconds
Notice: Applied catalog in 0.48 seconds
# cat /tmp/authorized_keys
ssh-rsa key comment
Using 7.13.1 correctly purges the keys as expected:
# puppet apply manifest.pp
Notice: Compiled catalog for XXX in environment production in 0.32 seconds