0
我使用下面的資源從elasticsearch:紅寶石YAML陣列
elasticsearch_configure 'elasticsearch' do
configuration ({
'path.repo' => ["/backups/s3_currently_dev", "/backups/s3_currently", "/backups/s3_daily", "/backups/s3_weekly", "/backups/s3_monthly"]
})
end
我需要完全以下的輸出:
path.repo: ["/backups/s3_currently_dev", "/backups/s3_currently", "/backups/s3_daily", "/backups/s3_weekly", "/backups/s3_monthly"]
但我得到以下之一:
path.repo:
- "/backups/s3_currently_dev"
- "/backups/s3_currently"
- "/backups/s3_daily"
- "/backups/s3_weekly"
- "/backups/s3_monthly"
這似乎並不奏效。我如何獲得所需的輸出?
重現:
1- Install Chef.
2- Create a cookbook.
3- Use elasticsearch community cookbook to install elasticsearch and configure with the resource shown.
4- Use kitchen or vagrant to create.
你是說調用'path.repo'是給你一個YAML樣的結果?也許嘗試寫作重現步驟。 – henrebotha
是的。如何將YAML結果更改爲我想要的輸出結果?我編輯了重現步驟。 – Lechucico
如果你做了'path.repo.class',你會得到什麼? – henrebotha