[英]ansible copy config file on each host
我有 2 个带有主机名的虚拟机
bishkek-01
bishkek-02
而且我有 2 个名为
bishkek-01.cfg
bishkek-02.cfg
以及如何将例如 bishkek-01.cfg 复制到 bishkek-01 和 bishkek-02.cfg 到 bishkek-02 vm? 使用组变量
你可以像这样使用复制模块
- name: Copying the config file to remote machine
copy:
src: {{ inventory_hostname }}.cfg
dest: <Your destination goes here>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.