ymlファイルでhashed arrayを表現するには


memo

chefのattributes/default.rbがこんな感じになっていたとする。

{
  "testattributes":{
    "category01": {
      "contents01": [
        {
             "foo": "bar", 
             "hoge": "hogehoge"
        }
      ]
    }
  }
}

これをymlにしてみる。

http://yaml-online-parser.appspot.com/
このサイトでパーステストしながらやってみた。

  testattributes:
   category01:
     contents01:
         - {"foo":"bar", 
            "hoge":"hogehoge"}

こうするとkitchen.ymlからテストできた。{}は要らないと思ってたら必要だった。