小编Car*_*_15的帖子

vars 文件夹中的 main.yml 文件在 ansible 角色中的用途是什么?

我的任务是将文件夹中的文件、模板文件夹中的模板复制到远程主机``

模板文件只有文本。

templates/templateexample.txt.j2 =>这是要传输的示例模板。

变量/main.yml

---
project_files:
  files:
    - src: "examplefile1.txt"
      dst: "~/examplefile1.txt"
      mode: '0755'
      force: false
  templates:
    - src: "templateexample.txt.j2"
      dst: "~/templateexample.txt"
      mode: '0755'
      force: false
Run Code Online (Sandbox Code Playgroud)

ansible

5
推荐指数
1
解决办法
1411
查看次数

标签 统计

ansible ×1