小编Del*_*vin的帖子

Ansible syntax best practice, YAML dictionary (key: value) or equal sign (key=value)?

I'm used to see Ansible examples as:

- file: path=/tmp/file state=touch
Run Code Online (Sandbox Code Playgroud)

but someone at work told me that I should be consistent using only YAML syntax like this:

- file:
    path: /tmp/file
    state: touch
Run Code Online (Sandbox Code Playgroud)

or,

- file: {path: /tmp/file, state:touch}
Run Code Online (Sandbox Code Playgroud)

Which one satisfies Ansible best practices?

yaml ansible

4
推荐指数
1
解决办法
3184
查看次数

标签 统计

ansible ×1

yaml ×1