我试图java
用测试厨房覆盖食谱中的属性.
当我尝试运行时kitchen converge default-centos-64
,会出现错误的YAML错误.
--- driver: name: vagrant customize: memory: 1024 cpuexecutioncap: 50 provisioner: name: chef_solo platforms: - name: centos-6.4 suites: - name: default run_list: - recipe[java::default] - recipe[maven::default] attributes: { java.install_flavor: "oracle", java.jdk_version: "7" }
我将上述内容粘贴到http://yamllint.com/.当我点击"Go"时,它会删除所有以"attributes"开头的行,然后显示绿色的"Valid YAML".
属性以正常的yaml内容提供:
suites: - name: default run_list: - recipe[java::default] - recipe[maven::default] attributes: java: install_flavor: "oracle", jdk_version: "7"
在入门显示类似你这样的语法:
suites: - name: default run_list: - recipe[java::default] - recipe[maven::default] attributes: { 'java': { 'install_flavor': 'oracle' } }