我剛剛進入hiera並已配置好它,我嘗試遷移到hiera的過程令人沮喪,因爲我無法獲得寫入語法。有人可以幫我把下面這個從類聲明轉換成hiera嗎?如何將類參數寫入hiera
在我declare.pp文件當前聲明:
class profile::web {
class { 'nsswitch':
automount => 'files',
hosts => ['files','dns'],
}
}
class { 'sudo': }
sudo::conf { 'web-users':
sudo_config_dir => '/etc/sudoers.d/',
source => 'puppet:///files/web/web-users.conf',
}
感謝 丹
Hiera不適用於聲明類。在hiera中,您可以存儲可在傀儡清單中使用的數據。你可以在puppet中聲明一個類,並且可以使用hiera根據節點名稱,環境等事實提供數據。 –