在yaml数组中嵌套多个值

时间:2015-12-31 23:23:35

标签: yaml

我需要将yaml文件的这一部分转换为数组:

ERR_CONNECTION_RESET

我对这部分有特定的问题:

  - name: postgresql_service_node
    release: cf-services-contrib
    template: postgresql_node_ng
    instances: 1
    resource_pool: common
    persistent_disk: 10000
    properties:
      postgresql_node:
        plan: default
    networks:
      - name: default
        default: [dns, gateway]

让它成为一个阵列。

就我而言:

properties:
  postgresql_node:
    plan: default
networks:
  - name: default
    default: [dns, gateway]

这就是我得到的错误:

templates: {    
    name: postgresql_service_node,
    release: cf-services-contrib,
    template: postgresql_node_ng,
    instances: 1,
    resource_pool: common,
    persistent_disk: 10000,
    properties:
      postgresql_node:
        plan: default
    networks:
      - name: default
        default: [dns, gateway]
}

如何在yaml中正确说明?

0 个答案:

没有答案