sweli 发表于 2018-7-30 06:42:52

ansible几个常用模块及参数的简单演示(2)

# ansible all -m copy -a "src=/etc/issue dest=/tmp/testansible"  
--> 将/etc/issue 文件复制到 /tmp/testansible 目录下,文件名和源文件名同名
  

  
# ansible all -m copy -a "content='hello world' dest=/tmp/testansible/first"
  
--> 给定内容生成文件 即 /tmp/testansible/first 的文件内容为 "hello world"
页: [1]
查看完整版本: ansible几个常用模块及参数的简单演示(2)