0

ansible 怎样把读取文件内容作为变量?

bloom created at6 years ago view count: 174
report
回复
0

使用lookup

- hosts: all
  vars:
     contents: "{{ lookup('file', '/etc/foo.txt') }}"
  tasks:
     - debug: msg="the value of foo.txt is {{ contents }}"
5 years ago 回复

Recent search keywords