【问题标题】:Need to change yaml file to properties file需要将 yaml 文件更改为属性文件
【发布时间】:2020-01-27 09:14:21
【问题描述】:

我正在尝试使用 ansible 将我的 yaml 文件转换为属性文件。 我有这样的 yaml 文件

class: tenth
hobbies: playing
name:
  first.last: jake.l

我需要将上面的 yaml 行转换为属性文件。 喜欢,

class = tenth
hobbies = playing
name.first.last = jake.l

有人可以帮忙

【问题讨论】:

    标签: python ansible jinja2


    【解决方案1】:

    Here 就是一个例子。从你说的我猜应该是这样的

    user.class=tenth
    user.hobbies=playing
    user.name.first_last=jake.l 
    

    【讨论】:

      猜你喜欢
      • 2020-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-27
      • 2020-05-27
      相关资源
      最近更新 更多