LoginSignup
0
0

More than 5 years have passed since last update.

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

Posted at

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からテストできた。{}は要らないと思ってたら必要だった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0