【发布时间】:2015-11-03 15:35:29
【问题描述】:
我正在尝试从属性子集编写.yml 文件。这是我正在使用的资源定义:
file '/home/user/file.yml' do
owner 'user'
group 'user'
mode '0755'
content node['default']['properties'].to_yaml
end
当我运行它时,file.yml 最终看起来像这样:
--- !ruby/hash:Chef::Node::ImmutableMash
config: !ruby/hash:Chef::Node::ImmutableMash
example: value
another: value
如何在没有所有 !ruby/hash:Chef::Node::ImmutableMash 输出的情况下获得干净的 yaml 输出?
【问题讨论】:
标签: ruby chef-infra yaml