Questions tagged «yaml»

1
Ansible库存层次结构
我想为Ansible创建一个库存文件作为独立排序。以下是此文件的示例: [houston:children] hst-lin hst-win [hst-lin:children] hst-lin-prod hst-lin-test [hst-win:children] hst-win-prod hst-win-test [lin:children] lin-hst lin-ny [lin-hst:children] lin-hst-prod lin-hst-test . . . 因此,用户可以键入“lin-hst”或“hst-lin”来访问休斯顿的Linux服务器。我的主要目的是这个。但此时存在问题。我有4个二进制变量(location,os,prod / test,int / ext),并且有太多组合用于键入与排序无关的。我想“hst-lin-int-test”与“lin-hst-test-int”相同。 在Ansible(或YAML)中有一种简单的方法可以做到这一点,还是应该键入这些变量的每个组合?我正在寻找交叉集群或类似的东西。
2 linux  ansible  yaml 

1
使用PowerShell将JSON转换为YAML
我有一个像这样的json数据。 sample.json [ { "id": 0, "name": "Cofine", "title": "laboris minim qui nisi esse amet non", "description": "Consequat laborum quis exercitation culpa. Culpa esse sint consectetur deserunt non.", "website": "cofine.com", "image": "http://placehold.it/32x32", "labels": ["blue", "red"], "labels_link": ["http://cofine.com/labels/blue","http://cofine.com/labels/red"], }, { "id": 1, "name": "Zomboid", "title": "adipisicing mollit esse aliquip ullamco nisi …
1 powershell  json  yaml 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.