您的位置:首页 > 其它

ansible高级用法

2015-12-19 17:52 309 查看
将多个符合正则的文件拷贝到目标机器

- name: Copy
copy: src={{ item }} dest=/root/.sshkeys mode=0600
owner=root group=root
with_fileglob:
- keys/*.pub


将多个文件合并

- name: Assemble keys into authorized_keys file
assemble: src=/root/.sshkeys dest=/root/.ssh/authorized_keys
mode=0600 owner=root group=root


register

把任务的输出定义为变量,然后用于其他任务

http://xdays.me/ansible状态管理.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: