# /home/administrator/code/environments/production/modules/base/manifests/ssh.pp # SSH 서버 운영 class base::ssh { package { 'openssh-server': ➊ ensure => latest, } service { 'ssh': ➋ ensure => running, require => Package['openssh-server'], } file { '.ssh': ➌ ensure => 'directory', name => '/home/administrator/.ssh', owner => 'administrator', group => 'administrator', mode => '700', } file { 'authorized_keys': ➍ name => '/home/administrator/.ssh/authorized_keys', owner => 'administrator', group => 'administrator', mode => '600', source => 'puppet:///modules/base/authorized_keys', require => File['.ssh'], } notify { "===== base::ssh =====\n": } ➎ }