1
有沒有辦法將/root/.ssh/authorized_keys中所有現有的ssh密鑰自動導入到puppet中?例如:將現有ssh_authorized_keys導入puppet資源
,如果我有/root/.ssh/ssh_authorized_keys以下內容:
ssh-rsa AAAAakljsehrkjysdfjkhasdkfhskjghg== [email protected]
ssh-rsa AAAAajklrkljeykljrsyehkrjryekjdkj== [email protected]
我想運行是這樣的:
puppet resource ssh_authorized_key
並獲得以下輸出:
ssh_authorized_key {'userA':
ensure => present,
key => 'AAAAakljsehrkjysdfjkhasdkfhskjghg==',
type => 'ssh-rsa',
name => '[email protected]',
user => 'root',
}
ssh_authorized_key {'userB':
ensure => present,
key => 'AAAAajklrkljeykljrsyehkrjryekjdkj==',
type => 'ssh-rsa',
name => '[email protected]',
user => 'root',
}
這是不是有可能?